Forum Moderators: not2easy

Message Too Old, No Replies

Hi All Vertical-align not working in Firefox

But it works in IE6

         

centime

3:38 pm on Apr 25, 2007 (gmt 0)

10+ Year Member



Hi all

i've got a page using 2 columns , header & footer

I want the items included to be aligned to the top, now this appears to work in ie6 using

div.right {
vertical-align: Top;
min-width: 140px;
overflow: auto;
width: 20%;
float: Top;
float: right;
background:#5e74b3;
padding-bottom:10px;
font-family: Verdana, Tahoma, Arial, sans-serif;
font-size: 8pt;
border-left: 1px solid #5e74b3;
}

but the code doen't work in firefox, the content stubornly aligns to the bottom

no urls , so,,

Xapti

11:39 pm on Apr 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A huge newbie mistake... very common.
And what's all this deal with float:top? where do peopel get this from? it's pretty popular too. There's no such definition for float... it's just float right, float left, or float none

vertical align is for aligning inline-level and 'table-cell' elements only... not block-level elements.
Secondly... it doesn't align the element, it aligns the inline children of the element.

The way to do this is quite simple...
Put all your middle content into one block level element(container).
Put your header content above it (in the code).
Put your footer content below it (in the code).