I have 2 nested divs inside the outer one whose width is: 100%. Both nested divs must be on the same line and must first get the size from it:
<div id="#outer" style="width:100%; border:1px"> <div id="#inner1" style="border:1px; display:inline"> inner div 1. Some text... </div> <div id="#inner2" style="width:100%????; border:1px; display:inline"> inner div 2... </div> </div>
The question is how to make the # inner2 div to get the rest of the horizontal space if the width of the # inner1 div is not specified and depends on what is inside?
PS All styles in a separate class in my case, here I put CSS in the style attributes just for simplicity.
I want the result to work in IE7 + and FF 3.6
In more detail for me it looks like this:
<style type="text/css"> .captionText { float:left; } .captionLine { height: 1px; background-color:black; margin: 0px; margin-left: 5px; margin-top: 5px; border: 0px; padding: 0px; padding-top: 1px; } </style> <table style="width:300px;"> <caption width="100%"> <div class="captionText">Some text</div> <div class="captionLine"> </div> </caption> <tr> <td>something</td> </tr> </table>
Here is an image of what I want: 
html css xhtml xhtml-1.0-strict
Artem 04 Feb '10 at 7:58 2010-02-04 07:58
source share