tags:

views:

90

answers:

3

Hi

How to have text in Vertical in PHP ??

I need text to be displayed in vertical style in Table Td text

it should print vertical or i need it to rotate ?

+4  A: 
Sarfraz
+1  A: 

That does not have anything to do with PHP.

Just use the proper CSS properties

http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection

EDIT: sorry, I thought this was cross-browser, but it looks like it only works in IE You can use -webkit-transform: rotate(-90deg); or -moz-transform: rotate(-90deg); for cross-browser compatibility.

nico
A: 

Assuming you want your output to be actual text, and not a graphic, you'll need to use CSS text rotation. Text rotation isn't currently part of the standard (though CSS3 should change that) and is generally supported by way of browser-specific prefixes (-webkit-transform for webkit, -moz-transform for Mozilla browsers) or text filters (IE).

This article provides a good overview on how to use CSS text rotation in a cross-browser way.

Daniel Vandersluis