HighDots Forums  

<td> with CSS

alt.html.tags alt.html.tags


Discuss <td> with CSS in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Net5
 
Posts: n/a

Default <td> with CSS - 09-10-2009 , 06:04 PM






I'm getting a validatioon error using <td class="g1">
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 can't find where it's not allowed.

Reply With Quote
  #2  
Old   
John Hosking
 
Posts: n/a

Default Re: <td> with CSS - 09-12-2009 , 10:21 AM






On Thu, 10 Sep 2009 15:04:21 -0700, Net5 wrote:

Quote:
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".

Quote:
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>

Quote:
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

Reply With Quote
  #3  
Old   
Net5
 
Posts: n/a

Default Re: <td> with CSS - 09-13-2009 , 08:27 AM



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

On Sat, 12 Sep 2009 16:21:26 +0200, John Hosking
<john-nin2 (AT) bluemail (DOT) ch> wrote:

Quote:
On Thu, 10 Sep 2009 15:04:21 -0700, Net5 wrote:

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

Reply With Quote
  #4  
Old   
Derek ( AT ) Blueyonder
 
Posts: n/a

Default Re: <td> with CSS - 09-15-2009 , 05:11 AM



Quote:
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.
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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.