I can't find a good solution to this problem. I have 2 divs inside a parent div. When I try and float the divs right and left to make 2 columns inside the parent div, the child divs end up underneath the parent div.
<head>
<link rel="stylesheet" type="text/css" href="float.css" /></head><body class="wrapper">
<div class= "whole">
<div class="left">
<p> Hello </p>
</div>
<div class="right">
<p> Hello Again</p>
</div>
</div>
</body>
CSS is
.whole{padding: 30px 30px 15px 30px;background-color: yellow;margin-bottom: 30px;}
.left{width:50%; position:relative; float: left;background-color:green;}
.right{width:50%; position:relative; float: right;background-color:red;}
Why would the content in the child divs "right, left" be below the parent div "whole" ??