Side by Side Div's Question

Show off new creations, get help, or just chat about all aspects of web development and design.

Side by Side Div's Question

Postby TheMiede on Sun Jun 14, 2009 10:16 am

I feel like this has been answered before, but I can't find the solution.

I have two DIV blocks that are side by side. #content_left and #content_right. I have both of their heights as 100%. Below both of them is a footer, however they both dont REACH the footer. How do I get it so that if #content_left is longer than #content_right, they will still both go all the way down to the footer evenly or synchronized without faking with with line breaks or empty paragraphs?
TheMiede
1337 p0st3r
1337 p0st3r
 
Joined: Wed Apr 20, 2005 4:11 am

Re: Side by Side Div's Question

Postby Blink on Mon Jun 15, 2009 8:09 am

You can't if you are using floated content. They will only expand as big as the content.

However you can fake it with something called faux columns. It involves setting a repeating background to a containing element for both divs.

http://www.alistapart.com/articles/fauxcolumns/
User avatar
Blink
Cool 'n that
Cool 'n that
 
Joined: Fri Oct 08, 2004 4:16 pm
Location: UK

Re: Side by Side Div's Question

Postby Jasard on Mon Jun 15, 2009 9:24 am

If you ever find yourself unable to find a solution, its always good to use Firebug (for Firefox) to see how other sites do it. Great way to learn.
User avatar
Jasard
1337 p0st3r
1337 p0st3r
 
Joined: Fri Nov 12, 2004 5:59 pm
Location: UK

Re: Side by Side Div's Question

Postby TheMiede on Mon Jun 15, 2009 2:40 pm

Thanks blink for a solution and rewKe for the advice. I would like to show you guys what I have so far, but its not supposed to be "published" yet.
TheMiede
1337 p0st3r
1337 p0st3r
 
Joined: Wed Apr 20, 2005 4:11 am

Return to Web Design & Development

Who is online

Users browsing this forum: No registered users