I want to position "rightBottomPart" to the bottom of "rightPart" and I want "rightPart to be as high as "leftPart". The problem is that I don't know the height of the content in "leftPart" and therefore I can't set the height of "text". (Height in "text" would solve it)
Right now it looks like this:
and I want it to look like this:
My code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
</head>
<body style="margin: 0px 0px 0px 0px;">
<div id="headers" style="background-color: Olive; width: 300px; height: 50px;"></div>
<div id="text" style="background-color: Navy; position: relative; width: 300px;">
<div id="leftPart" style="background-color: Gray; width: 200px; float: left;">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
<div id="rightPart" style="background-color: Red; float: right;">
<div id="rightTopPart" style="background-color: Lime; position: absolute; right: 0px; top: 0px;">top</div>
<div id="rightBottomPart" style="background-color: Yellow; position: absolute; right: 0px; bottom: 0px;">bottom</div>
</div>
</div>
</body>
</html>
It looks right in IE7, but not in the rest of the browsers I've tested. If I remove the DOCTYPE-tag it also looks good in IE8, but still not in Google Chrome.
What am I missing?
Thanks Carl