
November 12th, 2004
01:45 AM
XHTML Table
Hey there.
I have just started to work with XHTML recently, and I'm having a problem with using tables. It's just that when I use the vertical alignment (valign) for a <td> tag, it doesn't work. Anybody know why?
Thanks in advance.
- Joey
___________________
luminire.net

November 12th, 2004
02:19 AM
take it out, add:
style="vertical-align:text-top;"
valign and align, as well as a bunch of other attributes are no longer allowed. (xhtml)
___________________


November 12th, 2004
03:19 AM
Semantics Whore
Status: Offline!
The fact that you use a table in xhtml is dubious. Are you sure you're using it to display tabular data such as a table full of numbers or names?
As for the solution to your question: the above way does work, but is not the most advisable way. It's the easiest though. More advisable would be a style sheet, preferably external...
Possible google queries:
"External style sheets css"
"css table"
"xhtml table"

November 12th, 2004
03:37 AM
@MinDFreeZ: Your method didn't work. 
___________________
luminire.net

November 12th, 2004
05:10 AM
Neverside Newbie
Status: Offline!
Originally posted by demonknight
@MinDFreeZ: Your method didn't work.
Can we please see your code or can you post a link to an online version of the page?
___________________
Tables for layout is an abuse. -- Internet Explorer is unsafe.

November 12th, 2004
06:31 AM
I don't have a page online yet, but I can show you a demo what I'm using...
<table width="100%" height="100%" border="0">
<tr>
<td width="100%" valign="middle">
<center>blah blah blah</center>
</td>
</tr>
</table>
___________________
luminire.net

November 12th, 2004
08:27 AM
try putting this in your <head>
<style>
td { vertical-align: top; }
</style>

November 12th, 2004
11:50 AM
Neverside Newbie
Status: Offline!
vertical-align works only on inline elements.
In any case, it might be because of the height='100%'. Try setting a fixed one and seeing if it changes. If yes, then you're on your own
probably no way to vertical align to center. However, that is the default alignment, so you can just remove the valign or something.
___________________
Learn HTML

November 12th, 2004
01:41 PM
Originally posted by MinDFreeZ
valign and align, as well as a bunch of other attributes are no longer allowed. (xhtml)
that is not true.
valign is ment for <tr> tag only, align is ment for <td> these two elements have not been removed. dont post false infomation please.
___________________
