Vertical text in <td>

P

Peter Lauri

Best groupmember,

I want to display text in a cell vertical (standing up). Basicly I want the
text to rotate 90 degrees. Any tips?
 
S

Spartanicus

Peter Lauri said:
Best groupmember,

I forgot who that is this month, will I do?
I want to display text in a cell vertical (standing up). Basicly I want the
text to rotate 90 degrees. Any tips?

<img src="verticaltext.png" width="50" height="100"
alt="your_text_here">

Use one of the css image replacement techniques if the text *must* be
indexed by badly broken search engines such as Google.
 
S

Spartanicus

Top posting is not appreciated here, snipping quotes is, corrected this
once.
I do not want to use an image, I am generating it from a database.

Not possible with html or current css, you could use SVG (which are text
files), but client support is poor.

Alternatively there are ways to generate images on the fly.
 
P

Peter Lauri

Do you mean to use the GD-lib and create the images and then just rotate
them?

/Peter
 
T

Toby Inkster

Peter said:
Do you mean to use the GD-lib and create the images and then just rotate
them?

I did this for a while using ImageMagick to display a faint copy of the
page's title text vertically in the background of each page.

It was quite a nice effect, but it took a lot of CPU. Of course, that
could be eliminated by caching the images, which I hadn't bothered to do
as I was only playing about.
 
J

Jan Faerber

Toby said:
I did this for a while using ImageMagick to display a faint copy of the
page's title text vertically in the background of each page.

It was quite a nice effect, but it took a lot of CPU. Of course, that
could be eliminated by caching the images, which I hadn't bothered to do
as I was only playing about.

or use php ... e.g.:

http://html.janfaerber.com/php/string_vertical.php

The script:

<?php
$im=ImageCreate (90,20);
$background_color=ImageColorAllocate($im,255,255,255);
$text_color=ImageColorAllocate ($im,233,14,91);
ImageString($im,1,5,5,"Hello World!",$text_color);
ImagePNG ($im, "hehe.png");
$im2 = imagerotate ($im, 90, 0);
ImagePNG($im2,"pic.png");
ImageDestroy($im);
ImageDestroy($im2);
?>

<img src="pic.png" border=0>
<img src="hehe.png" border=0>
<img src="pic.png" border=0>
<img src="hehe.png" border=0>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top