?
Solved

[Probably Simple] Responsive CSS Layout Question

Posted on 2016-10-28
4
Medium Priority
?
137 Views
Last Modified: 2016-11-01
https://www.custompatches.net/

All I want is for the quote form to no be shoved all the way to the bottom on smaller screen sizes. I want it to be right below the slider. But I want it to stay as is on desktop. Is this simple enough to do?
0
Comment
Question by:underrugswept
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41864818
For small screen sizes, you could try using a media query to apply style:
display: table;

Open in new window

to the parent container, and style:
display: table-header-group;

Open in new window

to the slider to make it appear at the top, and style:
display: table-footer-group;

Open in new window

to the containers that you want below the form, to make them appear last.

That would leave the form appearing in the middle section of the table, after the slider.

Someone has put together a jsfiddle demonstrating this already: http://jsfiddle.net/lockedown/gyef3vj7/1/
0
 
LVL 58

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 41868609
This is achievable but you need to restructure your markup. You currently have the sidebar outside of the container that holds the slider and other main page content.

Start with a mobile first design
<div>Slider</div>
<div>Form</div>
<div>Other content</div>

Then add BS classes to move the navbar out to the left on larger screens. Something like this
  <div class="row">
    <div class="col-sm-12 col-xs-12 col-md-9 pull-right">
      <div class="slider"></div>
    </div>
    <div class="col-sm-12 col-xs-12 col-md-3">
      <form>
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
        <input type="text" class="form-control">
      </form>
    </div>
    <div class="col-sm-12 col-xs-12 col-md-9 pull-right">
      <div class="supplementary"></div>
    </div>
  </div>

Open in new window

Working sample here - the blue and green areas are placeholders for the slider and other content on the page.
1
 
LVL 1

Author Closing Comment

by:underrugswept
ID: 41868876
Yes, that worked, as always. Thank you so much!
0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 41868944
You are welcome.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question