Div inside another div incorrectly occupies the parent width of the div

Here is your dumb HTML / CSS question for the day ....

I have a div that contains two other divs. The container is set to display: box / -webkit-box / etc for folding the contained divs horizontally. The first containing div is some fixed content, and the second contains a bunch of other small tile fragments.

Here's an example: http://jsfiddle.net/dex3703/T2EZy/3/

A crappy chart is also shown (note that the 1000px shown is just an example - there is no width in any of the div containers):

Cheesy diagram

, div div , . , divs . , , , . div.

+3
4

display: box, float: http://jsfiddle.net/gpdV3/

0

PX 100%.

, "1000px" css

:

0
0

This is because you encode the width of your div (something like .MyClass {width: 1000px}).

Please look at this answer:

How to make CSS width to fill parent?

-1
source

All Articles