Inner div's children to expand horizontally

Check this fiddle

I want the inner blue divs to be placed horizontally, side by side, instead of gridded. I've tried using white-space:nowrap but it does not work because these are block elements.

If I set a fixed width to the #subcontainer layer it works, but I don't know the width of that layer as it gets dynamically rendered using server data.

I cannot use display: inline-block because the layers need to be together, with no gap between them.

Upvotes: 0

Views: 60

Answers (1)

Billy Moat
Billy Moat

Reputation: 21050

You can just add a large percentage width on #subcontainer

http://jsfiddle.net/YFx65/5/

Upvotes: 1

Related Questions