HighDots Forums  

Inheritance and individual fomats

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Inheritance and individual fomats in the Cascading Style Sheets forum.



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

Default Inheritance and individual fomats - 09-10-2004 , 03:15 AM






Hi,

I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

<table id="thistable">
<thead>
[...]
</thead>
<tbody>
<td></td>
</tbody>
</table>

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.

What do i do wrong?

Chris

PS: I don't use tables for layout, just to leave no doubt...

Reply With Quote
  #2  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: Inheritance and individual fomats - 09-10-2004 , 03:20 AM






Chris Leipold wrote:

Quote:
I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

table id="thistable"
thead
[...]
/thead
tbody
td></td
/tbody
/table

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.

What do i do wrong?
<td> should be enclosed in <tr>, I think.

The principle works fine here: see
http://tranchant.plus.com/tmp/td

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Inheritance and individual fomats - 09-10-2004 , 03:25 AM



Chris Leipold <cleipold (AT) dietzk (DOT) de> wrote:

Quote:
Hi,

I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

table id="thistable"
thead
[...]
/thead
tbody
td></td
/tbody
/table

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.

What do i do wrong?
Well, for one thing, you've got invalid HTML, since TD doesn't go
directly inside TBODY. TD can only go inside TR, and only TR can go
inside TBODY. Fix and validate your page, and then see what happens.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ๔ter le premier point de mon adresse de courriel.


Reply With Quote
  #4  
Old   
Chris Leipold
 
Posts: n/a

Default Re: Inheritance and individual fomats - 09-10-2004 , 03:34 AM



Hi,

Quote:
I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

table id="thistable"
thead
[...]
/thead
tbody
td></td
/tbody
/table

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.
What do i do wrong?

td> should be enclosed in <tr>, I think.
Sorry, sorry, sorry!!! My code is valid, I just copied and pasted not
the whole code an forgot to copy the <tr>. (I used the w3-validator
before mailing to the group).

Chris


Reply With Quote
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Inheritance and individual fomats - 09-10-2004 , 05:11 AM



Chris Leipold <cleipold (AT) dietzk (DOT) de> wrote:

Quote:
Hi,

I tried to apply a format to all td's in one specific table but not to
the td's in other tables.
I tried the following:

table id="thistable"
thead
[...]
/thead
tbody
td></td
/tbody
/table

withe the style:
#thistable td { [...] }

But the style applies to all td's in the document, even in other tables.
What do i do wrong?

td> should be enclosed in <tr>, I think.
Sorry, sorry, sorry!!! My code is valid, I just copied and pasted not
the whole code an forgot to copy the <tr>. (I used the w3-validator
before mailing to the group).
Then something else is wrong, but if we can't see all your code, the
chances are that all we have to look at is where the problem isn't.

Also--what browser are you using?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ๔ter le premier point de mon adresse de courriel.


Reply With Quote
  #6  
Old   
Neal
 
Posts: n/a

Default Re: Inheritance and individual fomats - 09-10-2004 , 10:45 AM



On Fri, 10 Sep 2004 10:34:57 +0200, Chris Leipold <cleipold (AT) dietzk (DOT) de>
wrote:

Quote:
Sorry, sorry, sorry!!! My code is valid, I just copied and pasted not
the whole code an forgot to copy the <tr>. (I used the w3-validator
before mailing to the group).
This is why a URL is recommended.


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 - 2008, Jelsoft Enterprises Ltd.