View Full Version : I cannot ever get Valign to work...


Xarcell
12-15-2003, 10:54 PM
I can never seem to get the VALIGN tag to work.

Here's what I have:

<TD WIDTH="100">

<TABLE VALIGN="top" BORDER="2" BORDERCOLOR="#000000" WIDTH="100" CELLPADDING="3" CELLSPACING="5" BACKGROUND="background_yellow_3.jpg" onMouseover="changeto('transparent')" onMouseout="changeback('white')">
<TR>
<TD BGCOLOR="#FFFFFF">

It's a table inside a table cell. I didn't bother posting all the code.

-Xarcell

hockyfan641
12-15-2003, 11:22 PM
try replacing it with some css.

<table style="vertical-align: top; border 2px #000000; width: 100; padding: 3px; background-image: url(background_yellow_3.jpg);" cellspacing="5" onMouseover="changeto('transparent')" onMouseout="changeback('white')">
<tr>
<td style="background-color: #ffffff">

pb&j
12-16-2003, 05:50 AM
VALIGN is a property of the TD tag, not the TABLE tag.

Xarcell
12-16-2003, 08:05 AM
Originally posted by pb&j
VALIGN is a property of the TD tag, not the TABLE tag.

Ahhhh....

That's why I can never get it to work.

-Xarcell

alphabyte
12-16-2003, 11:24 AM
Originally posted by hockyfan641
try replacing it with some css.

<table style="vertical-align: top; border 2px #000000; width: 100; padding: 3px; background-image: url(background_yellow_3.jpg);" cellspacing="5" onMouseover="changeto('transparent')" onMouseout="changeback('white')">
<tr>
<td style="background-color: #ffffff">

Vertical-align is not standardized coding, nor have I ever even heard of it. It will not work, except for maybe the case of the Internet Explorer browser.

hockyfan641
12-16-2003, 08:41 PM
yes, actually it does work. I've tested it in IE and mozilla, and I'm pretty sure it validates.

pb&j
12-17-2003, 03:53 AM
yes, vertical-align is a valid css property. its values can be top, middle, or bottom.

alphabyte
12-17-2003, 11:24 AM
That's odd. It doesn't have any effect in Mozilla. I don't think my OS would be the problem, would it? I use JAMD Linux.

pb&j
12-17-2003, 01:35 PM
i have mozilla 1.5.
try testing this...

<table style="height:300px;" border="1"><tr><td>
normal stuff
</td><td style="vertical-align:top;">
top aligned
</td></tr></table>

hockyfan641
12-17-2003, 08:32 PM
I've got mozilla firebird, works fine. I use it with my site.

alphabyte
12-17-2003, 08:49 PM
Originally posted by hockyfan641
I've got mozilla firebird, works fine. I use it with my site.

Do you have a Linux OS? And pb&j, the code didn't work...