In the book "XHTML Black Box" it gives both align and valign as
attributes to the td tag.
I can't find where it's not allowed.
> I'm getting a validatioon error using <td class="g1">
You didn't say, but presumably you mean "CSS validation error", as opposed
to "markup validation error".
> where the CSS definition is:
> td.g1 {align: center; valign: middle}
>
> In the book "XHTML Black Box" it gives both align and valign as
> attributes to the td tag.
I don't have that book, but I do have the WWW and the W3C's site. Yes,
align and valign are defined attributes in HTML
<http://www.w3.org/TR/html401/struct/tables.html#h-11.2.6>
and XHTML 1.0
<http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-strict.dtd_td>
>
> I can't find where it's not allowed.
Your problem is that you are trying to use HTML attributes as CSS
properties. That might work for some properties, but won't for these.
Take a look at the text-align property
<http://www.w3.org/TR/CSS21/tables.html#column-alignment>
and the vertical-align property
<http://www.w3.org/TR/CSS21/tables.html#height-layout>. Alignment can be
tricky, but the Web has lots of tutorials and articles about how to
approach it, if you search for them.
And as I just mentioned to Derek (who probably never saw it), you might
have noticed this group's low article count. It's all but dead (or I am the
undead). You might also look at comp.infosystems.www.authoring.html
(currently quiet as well, but with more subscribers) or
comp.infosystems.www.authoring.stylesheets. Your question isn't really
about the HTML tags (subject of this NG) but about properties in CSS.
HTH
--
John
Thanks much. I did notice the sparce messaging and wondered if I would
get a reply.
Yes I did a dumb dumb muistake - must be tha i'm only getting 4 hrs
sleep a night. Yes it should be text-align etc.
Stephen
Hi
I did see your reply thanks, I work away and only see these groups when I am
home.
Many thank for your reply.
I am about to use the solution you gave.
Derek