M.O.S. Studios Posted June 2, 2010 Share Posted June 2, 2010 Here is the issue <div class='content'></div> is going beyound the bottom border of <div class="comic_border"> ... </div> I want 'comic_border' to expand with 'content' rather then let it grow out side of its border. any ideas? css html, body{ border-width: 0px; padding: 0px; margin: 0px; font-size: 90%; width: 100%; height: 100%; background: #000000; } .comic_border{ width: 1000px; height: 100%; margin-top: 20px; margin-left: auto; margin-right: auto; padding: 25px; background: #da1b1b; border: solid 5px #ffffff; } .header{ margin-left: auto; margin-right: auto; margin-bottom: 25px; width: 100%; height: 186px; background: url(../../images/background/citywhite.png) repeat-x; } .content{ width: 100%; height: 100%; background: #ffffff; margin-bottom: 10px; } html <!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> <link href="common/css/main.css" rel="stylesheet" type="text/css" /> <title></title> </head> <body> <div class="comic_border"> <div class="header"></div> <div class="content"></div> </div> </body> </html> thanks im advance Quote Link to comment https://forums.phpfreaks.com/topic/203644-div-child-breaches-parent-div/ Share on other sites More sharing options...
haku Posted June 2, 2010 Share Posted June 2, 2010 Why have you put all these 100% heights on everything? Remove those, and let the divs expand with the content inside them. Quote Link to comment https://forums.phpfreaks.com/topic/203644-div-child-breaches-parent-div/#findComment-1066718 Share on other sites More sharing options...
M.O.S. Studios Posted June 2, 2010 Author Share Posted June 2, 2010 awesome, worked Quote Link to comment https://forums.phpfreaks.com/topic/203644-div-child-breaches-parent-div/#findComment-1066912 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.