Expanded continuation of the question How to stretch the div-block to the full width of the page? in pictures

There is a div unit. Beautiful and black with a width:100% . Must occupy the entire width of the screen.

We look through chrome:

alt text

It's ok.

Reduce the browser window

alt text

It seems the same

We shake right:

alt text

Here it is a joint.

So width:100% stretches the block to the edge of the screen, not the page?

What used:

 html, body { width: 100%; height: 100%; } .div { **min-width**: 100%;position: relative; } 

and

 html, body { width: 100%; height: 100%; } .div { **width**: 100%;position: relative; } 

Broke his head. I ask for help.

  • @ Oleg B, to some extent right. I encountered the same problem on twitter bootstrap 3.1 (I don’t remember how I decided), a problem in css and scripts in the left menu, you need to dig in this direction. - MasterAlex
  • Yes, bootstrap, put in minheght the minimum width of all the blocks, and the whole business. - Rammsteinik

2 answers 2

Your bottom blocks have a total width of more than 100%, what's the big deal? This is obvious, since the horizontal scroll appeared. Give them a width in percent, well, or show html and styles, or give a link to this page. Here ( http://jsfiddle.net/nk3oyLao/ ) you can play around with the min-width of the wrapper style

    max-width put and you will be happy)