I want to place two DIV tags side by side without using fixed width. The first div expands to its content and the second div should fill the remaining space. Also the div
See: http://jsfiddle.net/kGpdM/
#left {
background: #aaa;
float: left
}
#right {
background: cyan;
overflow: hidden
}
This works in all modern browsers and IE7+.
The left column will be exactly as wide as the content inside it. The right column will take the remaining space.
The overflow: hidden
"trick" behind this answer is explained here.