Click here to Skip to main content
15,867,594 members
Articles / Web Development / HTML
Tip/Trick

Making Text Upside down using CSS

Rate me:
Please Sign up or sign in to vote.
4.95/5 (28 votes)
25 Nov 2011CPOL 123.9K   20   30
Making Text Upside down using CSS

Description


After seeing this message by PompeyBoy3, I wanted the same in CSS, so I have tried & am now posting here.

Code


XML
<html>
<head>
<title>Text Up side down</title>
<style type="text/css">
.txtUpsideDown 
{
	filter:  progid:DXImageTransform.Microsoft.BasicImage(rotation=2);  /* IE6,IE7 */
	ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; /* IE8 */
	-moz-transform: rotate(-180deg);  /* FF3.5+ */
	-o-transform: rotate(-180deg);  /* Opera 10.5 */
	-webkit-transform: rotate(-180deg);  /* Safari 3.1+, Chrome */
	position: absolute; 
}
</style>
</head>
<body>
<div class="txtUpsideDown">Test message</div>
</body>
</html>

Browser Compatibility


I have tested this script in the following Web browsers:

  • Internet Explorer
  • Mozilla Firefox
  • Google Chrome
  • Safari
  • Opera

Reference


http://css3please.com/

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: Cheers. :) Pin
RaisKazi21-Dec-11 0:41
RaisKazi21-Dec-11 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.