Question

My problem is posted as "solved" here, but apparently I don't understand the solution (?). I have piles of legacy html that appears to be starting to fail in my browser, I dunno why, maybe because of "unsupported" attributes? (Extremely frustrating, by the way. Why eliminate these much simpler attributes that worked fine for decades? I don't give a frickin' rip what anyone thinks of my coding style, as long as it WORKS.)

In particular, I use and the valign doesn't work. So I tried the following, with never a success:

<td align=center vertical-align:top>
<td text-align:center; vertical-align:top>
<td text-align:center; vertical-align:text-top>
<td vertical-align:text-top>

Now I'm only more frustrated. Any suggestions?

No correct solution

OTHER TIPS

The vertical-align:top is not supposed to occur in the td tag itself. You have to put it in a style="" line or in the CSS rules for td.

Using style="":

<td align="center" style="vertical-align:top">
<td style="text-align:center; vertical-align:top">
<td style="text-align:center; vertical-align:text-top">
<td style="vertical-align:text-top">

For the CSS method, you will have to give a seperate class or id to each td in order for their styles to be different.

You can use valign= top not valign: top or vertical-align: top in your html markup and use vertical-align: top; in css

In your html you could do this

<td align=center valign=top>

In your css stylesheet

td{vertical-align: top;}

And in your inline-style

<td align=center style="vertical-align: top;">

Insted vertical-align:top use valign="top".

Here is your the code:

<td align="center" valign="top">

Note: Never use : in the HTML attributes so instead of using valign:top you should use valign="top"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top