Rotating Text with CSS

If you look up you'll notice I made a small update to the way dates are presented in my headings. It's not a big change, but I wanted to include the year without increasing the height of the date stamp.

Rotating text to the rescue! Following Jonathan Snook's article it was easy to implement the few lines of CSS necessary to make this adjustment.

Getting it to look right in IE7 and IE8 was a different matter. In the end I used the *:first-child+html hack for IE7 and the \9 hack for IE 8.

I realize that I should replace these hacks with conditional comments (should I?), but for now they'll suffice. Also, with a little more research it looks like this IE7/8 hack would have been more elegant.

Posted on: September 9, 2009 | 18 Comments

Recent Entries in "CSS"

18 Comments Posted (Add Yours)

Doesn't work in Opera unfortunately.

Sweet. I like the effect. Somebody asked last week whether the entire contents of a div could be rotated.

I'll follow your research and see if this may be possible.

Looks great in IE8, but unfortunately breaks in Firefox 3

What's the combined IE7/8 hack?.

I'm on FF3.5 and it's fine by the way!

Seems rather a lot of hassle for something that you would be much easier with images and have the final result looking a lot better too.

Yes, the Opera issue is a bit of a problem. Perhaps I'll have to use the original CSS sprite method instead.

Just what I needed, been looking to hack IE8. It was for something completely different but thanks.

Wow, i've been wondering how this was being done before when I've seen it else where. It's working just fine in Firefox 3.5.3 too. Why everything has to be so hard with IE i'll never understand... good hacks you've suggested though, thanks!

That is pretty cool. Great idea for blogs.

Word Luci, IE really is a pain. I still don't get it. Thanks for the suggestions/ideas.

It's an interesting idea, but could also be a very bad one when put into the wrong hands! Imagine badly designed sites made worse with a load of text that isn't facing the right way!

But at the moment it seems as though it's more of a hack than functionality, in this case it looks pretty nice.

This is something that can help me i think. I am new to web design and have had so many IE problems that it makes my head hurt. Most of them to do with Spry and Iframes not showing up like i want them to.

Interesting share! We were tweaking our blog (wordpress) and this might help.

Very cool CSS tip for us web design company guys- looks great!

ps: there's nothing wrong with things that don't work in IE 6 or 7 (or even 8) as long as they degrade decently.

Cool great idea

Very nice little trick. Comes in handy in the toolbox. Can't wait to try it myself.

Seems to work in Firefox 3.5 and IE8. Very, very, useful bit of CSS, been trying to do this for hours on a website and you've given me the answer. Thanks for the post.

Not looking so good on FF to be honest. The Date somewhat covers half of the year!

Post a Comment

*
*
 

Live Comment Preview

Subscribe

Subscribe to my RSS FeedSubscribe to my RSS Feed

Categories

Proud member of 9rules network