Post by moneyman18 on Nov 2, 2009 14:52:12 GMT -8
I am trying to float a couple of divs next to each other inside the wrapper div. The problem I am having is that the parent div does not stretch to the size(height) of the two floating divs.
Any clue how I can fix this so that the wrapper div is the same size of its contents?
Thanks
Any clue how I can fix this so that the wrapper div is the same size of its contents?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css"><!--
#wrapper {
width: 100%;
border: 1px solid #000000;
}
.left, .right {
width: 50%;
float: left;
position: relative;
}
img.wrap {
width: 100px;
height: 100px;
float: left;
position: relative;
}
--></style>
</head>
<body>
<div id="wrapper">
<div class="left">
<img src="/image.png" alt="" class="wrap" style="border: 0;" />
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</div>
<div class="right">
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
</div>
</div>
</body>
</html>
Thanks