Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text displayed vertically in a table <td></td> 1

Status
Not open for further replies.

Evan145

Technical User
Dec 24, 2001
33
IE
Hi,
A problem Ive been thinking about for a while.
I have an XML file that I apply a stylesheet to.
It simply displays the data in a 'table', <table><tr><td> etc

Code:
<xsl:template name="parseStringTableData">
 <xsl:param name="first"/>
 <xsl:param name="rest"/>
    <TD align="center"><font size="1"><xsl:value-of        
                          select="$first"/></font></TD>
    .........

Output..........
------------------------------------------
| | VeryLongHeader1 | VeryLongHeader2 |
------------------------------------------
| 1. | 12 | 3434 |
------------------------------------------
| 2. | 1233 | 88 |
------------------------------------------

Desired output........Headers aligned vertically
-----------------
| | 1 | 2 |
| | r | r |
| | e | e |
| | d | d |
| | a | a |
| | e | e |
| | H | H |
-----------------
| 1. | 12 |3434|
-----------------
| 2. |1233| 88 |
-----------------

Is this possible in simple html?........or does anyone know a neat way of doing it.

Thanks
Evan
 
u may have to use a loop to do that:
HeaderVal="Header"
for i=o to Len(HeaderVal)
response.write mid(HeaderVal,i,1)&"<br>"
next

thats just a small example...

Known is handfull, Unknown is worldfull
 
Thanks Chris
I used the solution in Thread215-547569 by Boomerang and it worked a treat.
Code:
<style>
.verticaltext {
writing-mode: tb-rl;
filter: flipv fliph;
}
</style>
'
'
'
<xsl:template name="parseStringTableData">
 <xsl:param name="first"/>
 <xsl:param name="rest"/>
    <TD align="center"><font size="1">
    <div class="verticaltext"><xsl:value-of select="$first"/></div></font></TD>
The output takes up alot less width now.
Evan :)
 
Why not do it like this?
Code:
<style>
.verticaltext {
writing-mode: tb-rl;
filter: flipv fliph;
text-align: center;
font-size: small;  /* or 8pt or whatever */
}
</style>
'
'
'
<xsl:template name="parseStringTableData">
 <xsl:param name="first"/>
 <xsl:param name="rest"/>
    <TD class="verticaltext"><xsl:value-of select="$first"/></TD>

Be aware, though, that the text will only be made vertical in IE.

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top