I have something like this:
<div class="wrap">
<div class="first">Example</div>
<div class="second">
<div class="inner"></div>
</div>
</div>
"wrap" have width (100% or 1000px)
"inner" have height and border-bottom
I want to expand "first" and "second" like this
|==================== 1000px or 100% ======================|
Example_____________________________________________________
If I add width to "first" and "second" it looks fine:
|==================== 1000px or 100% ======================|
Example_____________________________________________________
but if Example text change to longer it wraps:
|==================== 1000px or 100% ======================|
Another_____________________________________________________
Example
and
text
But if "first" and "second" have no width "second is invisible:
|==================== 1000px or 100% ======================|
Example
How to do it?
EDIT:
from this:
Expand a div to take the remaining width
It works, example:
<html>
<head>
<style type="text/css">
div.box { background: #EEE; height: 100px; width: 500px; }
div.left { background: #999; float: left; height: 100%; width: auto; }
div.right { background: #666; height: 100%; }
div.clear { clear: both; height: 1px; overflow: hidden; font-size:0pt; margin-top: -1px; }
</style>
</head>
<body>
<div class="box">
<div class="left">Tree</div>
<div class="right">View</div>
<div class="clear" />
</div>
</body>
</html>