Forum Moderators: not2easy
<div id="parent" style="margin...; padding...">
<div id="child_1" style="float: left; width: 250px">
<div id="whatever"></div>
<script>$('#whatever').ajax('whatever.php');</script>
</div>
<div id="child_2" style="float: left">
<p>$example_1</p>
<p>$example_2</p>
<p>$example_3</p>
</div>
<div style="clear: both"></div>
</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".
#child_1{
position:relative;
display:inline-block;
width: 250px;
background-color:red;
}
#child_2{
position:absolute;
display:inline-block;
background-color:#cdcdcd;
}