M.O.S. Studios Posted February 4, 2010 Share Posted February 4, 2010 here is my layout <div class='wrapper'> <div class='right'></div> <div class='content'></div> <div class='left'></div> </div I've tried a few different css codes, I cant figure out what combo i need exactly. i want .content to determine the height of: .wrapper, .right and .left and i want the height of .content to be determined by the content inside with a minimum of 800px. any ideas? thanks in advance Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/ Share on other sites More sharing options...
merylvingien Posted February 4, 2010 Share Posted February 4, 2010 I am still not sure what you want after reading your post over again LOL Anyway, i think you want the minimum height of .content to be 800px? .content {min-height:800px} If thats not it, then my apoligies, i will re read your post again and again LOL Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/#findComment-1007115 Share on other sites More sharing options...
haku Posted February 5, 2010 Share Posted February 5, 2010 You can't set the sizes of .right and .left according to the size of .content. CSS is not a computational language, and doesn't allow sizes to be computed based on the sizes of other elements, unless those other elements are directly interacting with each other, which in your case, they aren't. Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/#findComment-1007131 Share on other sites More sharing options...
M.O.S. Studios Posted February 5, 2010 Author Share Posted February 5, 2010 well I'm going to re-phrase my question, just in case there is a misunderstanding. basically the .right and .left div have to run parallel to content and at the same length. the problem I'm having is that when .content is expanded to more then 800 px all the other divs stay the same length Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/#findComment-1007146 Share on other sites More sharing options...
haku Posted February 5, 2010 Share Posted February 5, 2010 CSS works in height and width. Which do you mean by length? Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/#findComment-1007177 Share on other sites More sharing options...
M.O.S. Studios Posted February 5, 2010 Author Share Posted February 5, 2010 I mean height Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/#findComment-1007185 Share on other sites More sharing options...
haku Posted February 6, 2010 Share Posted February 6, 2010 If you want the sides to expand with the content, you need to structure it like this: <div class='right'> <div class='left'> <div class='content'></div> </div> </div> Link to comment https://forums.phpfreaks.com/topic/190972-div-relative-height/#findComment-1007701 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.