NameSilo

How to keep same heights for 3 column layout in CSS

Spaceship Spaceship
Watch

Graphixcon

Established Member
Impact
1
Hi everyone

I m working on a website which has a 3 column layout the left column is a light color, the middle a liitle darker than the left and the right the darkest of all three... now without using any background images i would like it to stretch in height ... suppose column 1st expands then the other 2 must also cover the space rather than keeping short and filling white space beneath.... im not getting a proper way to make them work... 1st and 3rd column are of 25% and the middle is of 50%.

Help Appreciated

Regards
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
Ehm shouldn't you just use tables?
 
0
•••
Wybe said:
Ehm shouldn't you just use tables?
Hmm, you could use a single celled container table. Put the divs inside it and then set their heights to 100%. So the table will expand based on the size of the biggest div, and the divs then expand to fill the rest of the table's height...

And just so that wasnt clear, here: :)
Code:
<table><tr><td>
<div></div> 
<div></div> 
<div></div> 
</td></tr></table>

If it doesn't work reply again and i'll make sure its sorted...;)
 
0
•••
I think using DIVs like such difficult ways is completely uneccesary and a weird hype. Just use tables with 3 collumns and you're done.

Other than that, Shorty's suggestion is bound to work

Edit: heh my 100th post. Now I can go and earn more money with ads in my sig lol
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back