smerny Posted January 17, 2012 Share Posted January 17, 2012 Having some issues I'm sure are elementary for most people here... <div id='container'> <div id='sidebar'> [stuff] </div> <div id='mainContent'> [other divs with more stuff] </div> </div> [*]how can i make it so that if 'sidebar' is longer than 'mainContent', mainContent becomes the same height... and vice versa? [*]having issues with divs in 'mainContent' actually extending past the 'mainContent' background, how do i make sure content within 'mainContent' doesnt hang outside of it? appreciate any help/advice Link to comment https://forums.phpfreaks.com/topic/255230-nested-div-fitting/ Share on other sites More sharing options...
AyKay47 Posted January 17, 2012 Share Posted January 17, 2012 make #sidebar and #mainContent heights 100%; that way each div will be the height of the parent div, if you don't want both divs to be the same height as #container, create another parent div inside of #conatiner. Link to comment https://forums.phpfreaks.com/topic/255230-nested-div-fitting/#findComment-1308585 Share on other sites More sharing options...
smerny Posted January 17, 2012 Author Share Posted January 17, 2012 i made #sidebar height:100% and the background/div only shows up like 40px tall, when it's (overflowing) content is around 800px tall Link to comment https://forums.phpfreaks.com/topic/255230-nested-div-fitting/#findComment-1308586 Share on other sites More sharing options...
smerny Posted January 17, 2012 Author Share Posted January 17, 2012 nvm. thanks. Link to comment https://forums.phpfreaks.com/topic/255230-nested-div-fitting/#findComment-1308599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.