Bart Platak
Bart Platak

Reputation: 4465

CSS Div side-by-side without set width

I'm trying to get two divs to appear side by side as follows:

The issue is that I do not have a set width for any of those divs so they just take up as much space as they can: jsFiddle

I have found several solutions but all of them required setting width for one of the divs which is what I'm trying to avoid. Any possible solution?

Upvotes: 2

Views: 1049

Answers (1)

Cory Danielson
Cory Danielson

Reputation: 14501

#left, #right { display: table-cell; }​
#left { white-space: nowrap; }

http://jsfiddle.net/CoryDanielson/LzREv/5/

Upvotes: 2

Related Questions