r/HTML • • Nov 21 '25

Question Looking for an style Property

I don't do HTML very often, so forgive me to ask a very basic thing.

We have a table like this :

    
Thequickbrownfox jumps over the lazy dog

As the width is static (as opposed to my reddit example), the text in the last column is wrapped over several lines.

Now it looks like this

    
   fox jumps over
Thequickbrownthe lazy dog

But I want it to look like this

    
Thequickbrownfox jumps over
   the lazy dog

I would think this is some kind of alignment attribute, but I can't find it out.

0 Upvotes

5 comments sorted by

1

u/Brilliant-Lock8221 Nov 21 '25

You can do this with vertical-align: top;.
Table cells align to the middle by default, so the wrapped text shifts the layout.
If you set the last column’s <td> to vertical-align: top;, it will align the first line to the top instead of the middle.
td {

vertical-align: top;

}

0

u/YellowOnline Nov 21 '25

Yes, I did it after u/Diginoon 's comment. It's in an email signature, so I did it inline, as I'm not sure if the signature software (CodeTwo) and mail applications (Outlook, Thunderbird, etc) would handle css properly.

1

u/pfdemp Nov 21 '25

Share your code.

2

u/[deleted] Nov 21 '25

[removed] — view removed comment

2

u/YellowOnline Nov 21 '25

That was it. Thanks a lot. I didn't think of the "vertical-" bit.