good morning...

i did a search for this, and didnt find what i needed to see.

i have a table with over 40 columns, i need them to align the text vertically like this:

t
a
b
l
e

h
e
a
d
e
r

is there a way to do this with html, css or php?

i dont want to double post - so i'm asking if there's a way to do this in those three languages

i hope someone can help with this.

thanks

I don't think so. I'd like to be pleasantly surprised to the contrary by another poster, but my first reaction is "no".

phalen, you asked if there was a solution using either HTML, CSS, or PHP.

In HTML, you simply just insert <BR /> after each letter. For example, if you had a table header containing the text "Average Length":

<th>
  A<br />v<br />e<br />r<br />a<br />g<br />e
  <br /><br />
  L<br />e<br />n<br />g<br />t<br />h
</th>

There is a CSS solution--sort of. This effect is not exactly what you mentioned, and it did not work in Firefox when I tested. It did work in IE.

<th style="writing-mode:tb-rl;filter: flipv fliph;">Average Length</th>

Finally, you mentioned PHP. The only thing PHP (or any other scripting language) is going to help you with in this situation is to dynamically break a string into individual characters and output each with a <br /> after it. So you could create a PHP function that when passed "Average Length", returns "A<br />v<br />e<br />r<br />a<br />g<br />e<br />&nbsp;<br />L<br />e<br />n<br />g<br />t<br />h".

Enjoy the journey. :)

thanks :) i got another solution too :) - it also uses the writing mode, and i used it in dynamic tables - saved me from scrolling left-right thru over 60 columns :D

<*style type=text/css">
.vert{
left:1px;
top:5px;
width:1px;
writing-mode: tb-rl;
}
</*style>

<span class="vert">this will be displayed vertically now</span>

I actually have another solution to rotating text.

I have recently done a project where I needed to make text for an envelope vert and I ran across a server software package that dynamically takes the text turns it into a graphic and then spins it and outputs it on the page. http://www.imagemagick.org/ the best news it that it is free.

I actually have another solution to rotating text.

I have recently done a project where I needed to make text for an envelope vert and I ran across a server software package that dynamically takes the text turns it into a graphic and then spins it and outputs it on the page. http://www.imagemagick.org/ the best news it that it is free.

It's an option, although it has a number of drawbacks, particularly in my situation. I want to be able to copy and paste the data to Excel for further manipulation, which wouldn't work with images. It also disables searching, accessibility, etc, etc.

However, for purely visual purposes, it's a good option, and definitely a site worth bookmarking.

chmac.

--
Blog: http://www.callum-macdonald.com/
Gallery: http://www.callum-macdonald.com/gallery/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.