Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-19 21:18:53
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Is valign valid on tr elements?
From this thread:
Can style="vertical-align:..."
be applied to a <tr>
element? Is it valid?
Alex
Offline
#2 2006-01-19 23:31:19
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Is valign valid on tr elements?
CSS2 Reference: 17.5.3 Table height algorithms
table cells maybe… but I think I’ll duck out now… c’mon Jeremie, one for you : )
Offline
Re: Is valign valid on tr elements?
Seems to be. I posted this code into the W3C validator and got green lights:
<pre>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“content-type” content=“text/html;charset=UTF-8” />
<title>sample</title>
</head>
<body>
<table>
<tr style=“vertical-align:top”>
<td>Content</td>
</tr>
</table>
</body>
</html>
</pre>
Another place I check for HTML and CSS information is htmldog.com
Last edited by jdykast (2006-01-20 00:07:13)
Offline
#4 2006-01-20 00:08:56
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Is valign valid on tr elements?
I’ve seen this already, but every mention of vertical alignment seems to relate to cells only.
Alex
Offline
Re: Is valign valid on tr elements?
I didn’t spend the time to wade through the documentation you listed but the following validates using the W3C CSS validator:
<code>tr {vertical-align: top;}</code>
Offline
#6 2006-01-20 00:47:21
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Is valign valid on tr elements?
The ‘vertical-align’ property of each table cell determines its alignment within the row.
which is similar to the use of vertical-align outside of table cells, i.e. it doesn’t set the vertical positioning within the element, but the vertical positioning of the element within its parent element…
can’t really see how rows can be vertically-aligned to the table itself?
maybe it validates but…
Offline
#7 2006-01-20 01:09:18
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Is valign valid on tr elements?
Put it this way: does it make any sense for this Textile:
^. |a|b|c|
..to produce this?:
<table><tr style="vertical-align:top;"><td><a></td>...</table>
Alex
Offline
Re: Is valign valid on tr elements?
zem wrote:
Canstyle="vertical-align:..."
be applied to a<tr>
element? Is it valid?
The vertical-align property can be applied to inline element and table cell. So the short answer is no, it’s not legal.
In the Textile context, what it should output is :
<table><tr><td style="vertical-align:top;"><a></td>...</table>
Last edited by Jeremie (2006-01-20 02:04:02)
Offline
Re: Is valign valid on tr elements?
To add to jeremies reply, the vertical-align
property doesn’t inherit, so applying it to a < tr >
won’t work, ever, in a decent browser in standards compliant mode.
BTW, Zem, when you look up documentation on CSS properties, you better check the CSS 2.1 documents, as those are much closer to the real world. The CSS 2.0 docs are a huge collection of contradictions, impossibilities and more.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Pages: 1