Parent Div not Expanding to Accomadate Child Div

I've been looking over my CSS/HTML for quite some time and I was wondering if you guys could lend me a hand. From my Googling, this seems to be a common problem for CSS Novices like myself.

Well, I have a wrapper <div> with some children inside of it. One of these is a fixed height sidebar that won't ever change, and the other child <div> is an area for content that has a lot of potential for change. When I fill this child <div> with text, instead of expanding the parent div like I would expect it to, it simple overflows.

I've tried using that <div  style="clear: both">&nbsp;</div> at the end of my container, but it doesn't seem to do the job for me. It seems the examples where it is a solution are only where people are floating their child divs, which I am not. Attached is the CSS and HTML.

Thanks in advance!
#contentWrapper
{
	position:relative;
	z-index:1;
	background-image:url('../Images/contentholderBG.png');
	background-repeat:repeat-y;
	width:970px;
	min-height:650px;
	height:auto;
	font-family: helvetica,arial,verdana,"microsoft sans serif",sans-serif;
	font-size:15px;
	display:block;
	overflow:hidden;
}

#content
{
	position:absolute;
	background:lime;
	padding:20px;
	width:670px;
}

#sidebar
{
	position:absolute;
	top:0;
	right: 9px;
	background-image:url('../Images/sidebarBG.png');
	width:258px;
	height:575px; 
}
#highlights
{
	position:absolute;
	left:17px;	
	top:65px;
	display:block;
	width:215px;
	height:125px;
}

#calendar
{
	position:absolute;
	display:block;
	width: 240px;
	height:200px;
	top: 260px;
	left:5px;
	font-family:Arial Narrow;
	font-weight:lighter;
}

.title
{
	color:#0061a3;
	font-size:22px;
	font-family:Arial Narrow;
	font-weight:bold;
}

HTML

<div id="contentWrapper">
        <span class="title">Test Title</span> <br />
        <p>Text Goes Here</p>

        <div id="sidebar">
            
        <div id="highlights"></div>
        <div id="calendar"></div>
        
        </div>
        
</div>

Open in new window

LVL 1
vartyjAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

remorinaCommented:
Hi vartyj,
You didn't utilise your #content div which obviously has a defined css class, you should place your content inside it

try the example below

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <style type="text/css">
        #contentWrapper
        {
            position: relative;
            z-index: 1;
            background-image: url( '../Images/contentholderBG.png' );
            background-repeat: repeat-y;
            width: 970px;
            margin: 0 auto;
            min-height: 650px;
            height: auto;
            font-family: helvetica,arial,verdana, "microsoft sans serif" ,sans-serif;
            font-size: 15px;
            display: block;
            overflow: hidden;
            border:solid 1px blue;
        }
        #content
        {
            position: absolute;
            background: lime;
            padding: 20px;
            width: 660px;
        }
        #sidebar
        {
            position: absolute;
            border: solid 1px red;
            top: 0;
            right: 9px;
            background-image: url( '../Images/sidebarBG.png' );
            width: 258px;
            height: 575px;
        }
        #highlights
        {
            position: absolute;
            left: 17px;
            top: 65px;
            display: block;
            width: 215px;
            height: 125px;
        }
        #calendar
        {
            position: absolute;
            display: block;
            width: 240px;
            height: 200px;
            top: 260px;
            left: 5px;
            font-family: Arial Narrow;
            font-weight: lighter;
        }
        .title
        {
            color: #0061a3;
            font-size: 22px;
            font-family: Arial Narrow;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div id="contentWrapper">
        <div id="content">
        <span class="title">Test Title</span>
        <br />
        <p>
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here
            <br /><br /><br />
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here
            <br /><br /><br />
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here
            <br /><br /><br />
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here
            <br /><br /><br />
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            <br /><br /><br />
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            <br /><br /><br />
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes
            Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here
            Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text Goes Here Text
            Goes Here Text Goes Here Text Goes Here
            Goes Here Text Goes Here Text Goes Here
            Goes Here Text Goes Here Text Goes Here
        </p>
        </div>
        <div id="sidebar">
            <div id="highlights">Highlights</div>
            <div id="calendar">Calendar</div>
        </div>
    </div>
</body>

Open in new window

0
vartyjAuthor Commented:
Sorry, I actually did use the #content ID. In my haste, I copied it over incorrectly.
I also solved the problem. Apparently it's recommended that you don't use absolute positioning in this case.
I changed my #content to
position:relative
float:left

and that took care of it. Thanks anyways!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.