简体   繁体   中英

How to align vertical text in a table?

I am trying to render a table that contains vertical text in its headers at the top. As Gecko doesn't yet support writing-mode:vertical-rl , I am trying to do this using transform:rotate(90deg) . I have gotten some way to doing this:

http://jsfiddle.net/4r3qeway/

However, the text is vertically centered in the table header cells, whereas I want the text to be vertically aligned at the bottom. Is there any way I can do this? Note that I can't hard-code the heights of the cells because the header cell text will change.

table td {
    background-color: yellow;
    vertical-align:text-bottom;

}

Just added vertical-align:text-bottom;

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM