Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: not2easy
<div id="parent" style="margin...; padding...">
<div id="child_1" style="float: left; width: 250px">
<div id="child_2" style="float: left">
<div style="clear: both"></div>
In your code as posted, you've set an explicit width on child_1 but not child_2, so you can hardly fault it for not sticking to a particular width. Was that just a glitch in posting?
What's wrong with max-width? It seems like just what you need.
As an alternative to "display: inline" you might try "display: table-cell". I know it seems like cheating after all these years of beating it into your head not to use tables for layout--but it does make it a lot easier to govern things like height and vertical alignment. And then you can set one of the two widths (child1 or child2) as a percentage of the "parent".