Solved

[Probably Simple] Responsive CSS Layout Question

Posted on 2016-10-28
4
128 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 57

Accepted Solution

by:
Julian Hansen earned 500 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 57

Expert Comment

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

728 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