Arch Stanton
07-20-2004, 01:45 PM
I am building a dynamic cross reference table and wanted the cells along the top to have the text rotated 90 degrees. Rather than go through all of the trouble of creating images with php, I figured out how to do it with CSS.
th.rotate {
writing-mode:tb-rl;
filter: flipH() flipV();
}
The writing-mode attribute changes the text to read like chinese, from top to bottom, with new lines going right to left (tb-rl). English is right to left with new lines going top to bottom (rl-tb). The filter applies effects to get the text to display read from the bottom up. Not to sure how that works. Anyways, this is all part of the css3 reccomendation which I don't think is in specification yet. In other words this will only work in IE, but should work in other browsers when the recommendation becomes specification and is implemented, so about 2 years :).
I'm picturing a little rolled up piece of paper singing on the steps of the W3C about how a recommendation becomes a specification.
Doing this with images would work in all browsers, but this still works in other browsers, but the text just doesn't rotate.
th.rotate {
writing-mode:tb-rl;
filter: flipH() flipV();
}
The writing-mode attribute changes the text to read like chinese, from top to bottom, with new lines going right to left (tb-rl). English is right to left with new lines going top to bottom (rl-tb). The filter applies effects to get the text to display read from the bottom up. Not to sure how that works. Anyways, this is all part of the css3 reccomendation which I don't think is in specification yet. In other words this will only work in IE, but should work in other browsers when the recommendation becomes specification and is implemented, so about 2 years :).
I'm picturing a little rolled up piece of paper singing on the steps of the W3C about how a recommendation becomes a specification.
Doing this with images would work in all browsers, but this still works in other browsers, but the text just doesn't rotate.