By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

about css

P: n/a
Hi, all

How do I define a css selector for TD elements working only if it is in a
table which has a class ="something"? Thanks a lot!

Jack
Jul 23 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
table.something tr td {color:burple;}

"datactrl" <qu***@tpg.com.au> wrote in message
news:41********@dnews.tpgi.com.au...
Hi, all

How do I define a css selector for TD elements working only if it is in a
table which has a class ="something"? Thanks a lot!

Jack

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.744 / Virus Database: 496 - Release Date: 8/25/2004
Jul 23 '05 #2

P: n/a
Thanks, Hal Rosser.

It works with table.something tr td {color:burple;}. I try to do like:
table.something.another.3rd tr td {color:burple;}
It seems to work for "3rd" only. That is I try to specify a table with a
class name of "something", "another" or "3rd".

Jack
"Hal Rosser" <hm******@bellsouth.net> wrote in message
news:i3******************@bignews1.bellsouth.net.. .
table.something tr td {color:burple;}

"datactrl" <qu***@tpg.com.au> wrote in message
news:41********@dnews.tpgi.com.au...
Hi, all

How do I define a css selector for TD elements working only if it is in a table which has a class ="something"? Thanks a lot!

Jack

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.744 / Virus Database: 496 - Release Date: 8/25/2004

Jul 23 '05 #3

P: n/a
table.something tr td,
table.another tr td,
table.3rd tr td {color:burple;}

Just curious, why would you ask this in a JavaScript newsgroup?

datactrl wrote:
Thanks, Hal Rosser.

It works with table.something tr td {color:burple;}. I try to do like:
table.something.another.3rd tr td {color:burple;}
It seems to work for "3rd" only. That is I try to specify a table with a
class name of "something", "another" or "3rd".

Jack

"Hal Rosser" <hm******@bellsouth.net> wrote in message
news:i3******************@bignews1.bellsouth.net.. .
table.something tr td {color:burple;}

"datactrl" <qu***@tpg.com.au> wrote in message
news:41********@dnews.tpgi.com.au...
Hi, all

How do I define a css selector for TD elements working only if it is in a table which has a class ="something"? Thanks a lot!

Jack


--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #4

P: n/a
Thanks Grant. It works. Why I ask css questions here is just because
javascript, dhtml and css are always involved each other on the page
authorising. Anyway this questions actually has nothing with javascript,
just expect the help form one newsgroup.

Jack
"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:41***************@agricoreunited.com...
table.something tr td,
table.another tr td,
table.3rd tr td {color:burple;}

Just curious, why would you ask this in a JavaScript newsgroup?

datactrl wrote:
Thanks, Hal Rosser.

It works with table.something tr td {color:burple;}. I try to do like:
table.something.another.3rd tr td {color:burple;}
It seems to work for "3rd" only. That is I try to specify a table with a
class name of "something", "another" or "3rd".

Jack

"Hal Rosser" <hm******@bellsouth.net> wrote in message
news:i3******************@bignews1.bellsouth.net.. .
table.something tr td {color:burple;}

"datactrl" <qu***@tpg.com.au> wrote in message
news:41********@dnews.tpgi.com.au...
> Hi, all
>
> How do I define a css selector for TD elements working only if it is
in a
> table which has a class ="something"? Thanks a lot!
>
> Jack


--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #5

P: n/a
On Sat, 4 Sep 2004 00:36:21 +1000, datactrl <qu***@tpg.com.au> wrote:
Thanks Grant. It works. Why I ask css questions here is just because
javascript, dhtml and css are always involved each other on the page
authorising. Anyway this questions actually has nothing with javascript,
Which is the point of Grant's, probably rhetorical, question.
just expect the help form one newsgroup.


However, it would be better to get help from the most appropriate group.
CSS questions should be directed to

comp.infosystems.www.authoring.stylesheets

By the way, the 'tr' in the selectors suggested so far are superfluous. A
TD element must always be a child of a TR element as a basic requirement
of HTML. Nothing is gained by specifying that relationship in the selector.

table.something td,
table.another td,
table.3rd td {color:burple;}

will do just fine and involve less processing by the user agent.

[snip]

Mike
Please don't top-post.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #6

P: n/a
datactrl wrote:
[...] Why I ask css questions here is just because
you lack a minimum Usenet clue.
javascript, dhtml and css are always involved each other on
the page authorising.
Nonsense.
Anyway this questions actually has nothing with javascript,
So post to comp.infosystems.www.authoring.stylesheets!
just expect the help form one newsgroup.
[Top post]


Take heed of the <http://jibbering.com/faq/> or go away.
PointedEars
--
Get your bug fixed and stop it breeding.
Jul 23 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.