Solved

[Probably Simple] Responsive CSS Layout Question

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS for <center> 14 49
.CSS HTML Help 3 57
send html form with multipe immages as buttons 2 37
Importing website from Wordpress into updated theme 3 35
This article discusses four methods for overlaying images in a container on a web page
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

734 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