Is there a (portable) way to rotate text in a HTML table cell by 90°?
(I have a table with many columns and much text for the headings, so I'd like to write it vertically to save space.)
Is there a (portable) way to rotate text in a HTML table cell by 90°?
(I have a table with many columns and much text for the headings, so I'd like to write it vertically to save space.)
There is a quote in the original answer and my previous answer on the IE8 line that throws this off, right near the semi-colon. Yikes and BAAAAD! The code below has the rotation set correctly and works. You have to float in IE for the filter to be applied.
Taken from http://css3please.com/
As of 2017, the aforementioned site has simplified the rule set to drop legacy Internet Explorer filter and rely more in the now standard
transform
property:Have a look at this, i found this while looking for a solution for IE 7.
totally a cool solution for css only vibes
Thanks aiboy for the soultion
heres the link
and here is the stack-overflow link where i came across this link meow
After having tried for over two hours, I can safely say that all the method mentioned so far don't work across browsers, or for IE even across browser versions...
For example (top upvoted answer):
rotates twice in IE9, once for filter, and once for -ms-filter, so...
All other mentioned methods do not work either, at least not if you have to set no fixed height/width of the table header cell (with background color), where it should automatically adjust to size of the highest element.
So to elaborate on the server-side image generation proposed by Nathan Long, which is really the only universially working method, here my VB.NET code for a generic handler (*.ashx ):
Note that if you think that this part
can be replaced with
because it works on the development server, then you are sorely mistaken to assume the very same code wouldn't throw a Generic GDI+ exception if you deploy it to a Windows 2003 IIS 6 server...
then use it like this:
Another solution:
I do absolutely admit that this is quite hackish, but it's a simple solution if you want to avoid bloating your css.