layout design

mikha
mikha used Ask the Experts™
on
I have an html page, with header, main content , footer and left hand side menu.
I have used a container class ( shown below in the example). I understand the max-width of the container changes with the size of the device and thus giving it's responsive nature.
but is it possible, to stop this behavior at some minimum width.

right now , if I view my page (sample html below), in a smaller laptop screen, the main content area is stacked below the leftMenu div. I would like to show the leftMenu and main content , side by side all the time, and when screen is too small have a horizontal scroll bars.
how can i achieve this?

<html>
    <div id="header class="container">
    </div>
     <div id="content" class="container">
         <div id="leftMenu">  </div>
         <div id="main content">  </div>
      </div>
      <div id="footer" class="container"></div>
</html>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David S.Consultant & Challenge Subduer
Top Expert 2009

Commented:
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
max-width is a css rule that specifies the maximum width a container can get to. It does not have anything to do with the device.

If you want to link the state of an element to device metrics you use media queries.

If you simply want to limit the width of your container to a certain value then
.container {
   max-width: 1140px;
}

Open in new window

If you look at the Bootstrap library - you will see that this is exactly what Bootstrap's container class does

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial