WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts

WeLoveCSS > WEB DESIGN > CSS > [SOLVED] Two divs with the same height

  Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 30th June 10, 03:28 AM   #1
WLC Member
Join Date: Jun 2010
Posts: 8
Default Two divs with the same height

I┤m creating a page with a content and a sidebar. I want both elements to be the same height but with different background color, so if the content area is longer than the sidebar , i want the sidebar background color to occupy the same height as the content.

So what i┤m doing in the html is to create a containing div for both the sidebar and the content, wich are inside their respective div too. The sidebar is floated to the left and the content to the right.

How can I do this?
things i┤ve tried:
set the sidebar with
height: auto;
none of them worked, the sidebar┤s height remained the same as the list it contains.
jdarias is offline   Reply With Quote

Thread Tools
Display Modes
Threaded Mode Threaded Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:57 AM.

Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyrightę 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.