PDA

View Full Version : Setting div heights in "auto"


gigiloumill
06-07-2011, 09:15 PM
Guys, I have a problem I can't figure out. I included a div called "main", in it I included I included 3 more divs with different widths and heights. I set the height to "main" on "auto" but, my problem is that when I set to "auto" it overlaps all the the divs inside the "main" div. Does any one have any suggestions oh how to fix? Thanks

gentleone
06-07-2011, 09:22 PM
need to see some code... especially CSS

gigiloumill
06-09-2011, 02:06 AM
O.K. here's the code and a link to a test page..http://blog.ilouie.com/test.html. I have no clue why it does that..Thanks

.main {
height: auto;
width: 800px;
margin-top: 5px;
margin-right: auto;
margin-left: auto;
}
.rightfield {
float: right;
height: auto;
width: 250px;
margin-top: 5px;
margin-right: 5px;
}
.centerfield {
float: right;
height: auto;
width: 300px;
margin-top: 5px;
margin-right: 5px;
}
.leftfield {
float: left;
height: auto;
width: 200px;
margin-top: 5px;
margin-left: 5px;
}
.top {
height: 100px;
width: 790px;
margin-top: 5px;
margin-right: auto;
margin-left: auto;
}
.mainfield {
height: auto;
width: 790px;
margin-top: 5px;
margin-right: auto;
margin-left: auto;
}
.footer {
height: 200px;
width: 790px;
margin-top: 5px;
margin-right: auto;
margin-left: auto;
}

DWcourse
06-09-2011, 02:17 AM
Is adding clear:both to the .footer style what you're looking for?

gigiloumill
06-09-2011, 02:23 AM
You lost me..Can you explain please? Thanks

gigiloumill
06-09-2011, 02:25 AM
Never mind...You're a genius....

DWcourse
06-09-2011, 02:39 AM
Never mind...You're a genius....

Aw shucks…