dadamssg Posted May 7, 2009 Share Posted May 7, 2009 i have a content area and then a right column....how do i set the right column to be the same height as the content? the content within the content div will change often so i don't want to set a pixel height...i want it to always be the same height. how do i accomplish this? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 7, 2009 Share Posted May 7, 2009 Depends on your layout, but in the worse case, I don't know a way outside of JavaScript. Quote Link to comment Share on other sites More sharing options...
dadamssg Posted May 7, 2009 Author Share Posted May 7, 2009 is that pretty hard? with javascript? Quote Link to comment Share on other sites More sharing options...
stewart Posted May 7, 2009 Share Posted May 7, 2009 http://www.impressivewebs.com/equal-height-columns-with-javascript-full-version/ There is a (fairly) quick run down on how to do it Quote Link to comment Share on other sites More sharing options...
dbrimlow Posted May 7, 2009 Share Posted May 7, 2009 If you want to avoid jscript and keep your layouts "natural", the easy to use trick in css is called faux columns. (this IS the css thread) It emulates the look of equal height columns across all browsers. The original (shows the technique) -faux columns- by Dan Cederholm. Revised technique - (for liquid layouts) faux columns for liquid layouts Gotta admit that jscript solution is pretty cool - but I try to limit jscript. Quote Link to comment Share on other sites More sharing options...
stewart Posted May 7, 2009 Share Posted May 7, 2009 Gotta admit that jscript solution is pretty cool - but I try to limit jscript. Agreed. I tend to try to make it where I just can avoid HAVING to have the equal height columns at all in the first place. I really hate using JS when it isn't needed.. Especially when it comes to controlling page layout and such. For some things however, it comes in handy. The faux-columns way is definitely a way to go too, but bothers me about it is when it comes to wanting to use another sort of background image in the same element, it becomes rather troublesome. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted May 8, 2009 Share Posted May 8, 2009 If IE supported Display: table; you could have easily used that to emulate table like height/width control. Faux columns is extremely difficult to implement when it comes to IE7. I had to "hack" IE7 to make padding/margins cross browser complaint. It was difficult primarily because I had the two columns as two separate boxes. I discourage utilizing javascript. It is unnecessary. Quote Link to comment 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.