I am trying to get three columns of equal length, with content of unequal length. I found a method that seems like it should work at http://callmenick.com/post/css-equal-height-columns-three-different-ways of setting the overflow on the parent container to hidden. But I can't get it to work: http://daveroel.comyr.com/penny/penny.htm
HTML:
I'm staring myself blind at this. The problem is obvious, the overflow: hidden declaration doesn't "take". If you put it in a style attribute in the DIV.container tag all is well. But I don't see what goes wrong. The selector matches AFAICS and I don't see any other rule contradicting that one.
I can't stare any longer right now. My screen is BSODed and flicker and I'll throw a fit if I don't give it a rest. But this is so far I've gotten.
Bah, I found it! You use .main in the selector but the DIV has the id main, not class.
Alas the layout goes all wonky if I change the selector to use the ID...
You have no syntax errors neither in the HTML nor the CSS, except for a non essential error for your host's stats script, so no clues there.
Seems the padding is wrong. If I remove that declaration it looks OK.
So instead of this
Right. If you want the right column to have the same height you need to give it the 'padding-bottom: 99999px; margin-bottom: -99999px' treatment.
This was a good trick. I hadn't seen it before, so thanks for that.
CSS Ninja! Your Kung Fu is excellent! Thank you!
Hey, if you still read, isn't the solution you use for equal columns the same as Solution A here?
http://css-discuss.incutio.com/wiki/Any_Column_Longest
They talk about it being buggy with anchors, but I don't know when that was written, probably long ago. Know something about that?
I decided to not be so lazy and tested myself. They are correct. This method doesn't work if there are links within the document. But I don't see it what they describe as "revealing the empty space" as the problem. Of course there is empty space under the shorter column. The main problem is that the browser scrolls down so the linked to spot is at the top, but because of the overflow: hidden the top of the page is now cut off and it isn't possible to scroll up again.
Well, still a neat trick if one keeps that in mind.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)