Forum Moderators: not2easy

Message Too Old, No Replies

can't vertically align div contents to top

cant vertically align the div contents, always central

         

adampdarcy

1:59 pm on Jun 15, 2009 (gmt 0)

10+ Year Member



Hi

Im trying to verically align a divs contents (2 tables) to the top in IE. I want the Div to be a min height (cant do this in ie) so i set the divs height to my min height and it seems to resize ok.. but.. in IE the contents appear vertically centre and i want them at the top. Any sugestions would be most welcome?

thanks
Adam

holyhttp

6:28 pm on Jun 16, 2009 (gmt 0)

10+ Year Member



You can for sure set the minimum height of a DIV container with the CSS rule say: min-height:200px;
You need to set the padding to 0 and make sure the vertical alignment rule is not inherited from some parent container.

swa66

9:37 am on Jun 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



@holyhttp: min-height is not supported by IE6 (later version do support it)

@adam:

Welcome to WebmasterWorld!

I think you're getting the vertical centering from something else than just a div with a height. (table cell somehow ?)