473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Multiple selectors in rule

Hi,

I've tried to do this but it does not work.

table.anmeldung tr + td { font-weight:bold; }

I'm looking for an easy way to bolden the left column in this table:
http://www.kunstwerk-jena.de/sommer_anm.html

Any comments?

Thanks a lot,
Axel
Jul 8 '08 #1
5 1567
* Axel Siebenwirth wrote in comp.infosystems.www.authoring.stylesheets:
>I've tried to do this but it does not work.

table.anmeldung tr + td { font-weight:bold; }
This matches 'td' elements with a ('tr' sibling that is a child of a
(table element that belongs to the class 'anmeldung')). Since td and
tr do not occur as siblings, this matches nothing.
>I'm looking for an easy way to bolden the left column in this table:
http://www.kunstwerk-jena.de/sommer_anm.html
You might be looking for

table.anmeldung tr td:first-child { font-weight: bold; }

You might look into using the 'th' element instead though.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Jul 8 '08 #2
In article
<7v********************************@hive.bjoern.ho ehrmann.de>,
Bjoern Hoehrmann <bj****@hoehrmann.dewrote:
* Axel Siebenwirth wrote in comp.infosystems.www.authoring.stylesheets:
I've tried to do this but it does not work.

table.anmeldung tr + td { font-weight:bold; }

This matches 'td' elements with a ('tr' sibling that is a child of a
(table element that belongs to the class 'anmeldung')). Since td and
tr do not occur as siblings, this matches nothing.
I'm looking for an easy way to bolden the left column in this table:
http://www.kunstwerk-jena.de/sommer_anm.html

You might be looking for

table.anmeldung tr td:first-child { font-weight: bold; }

You might look into using the 'th' element instead though.
That's what I did in an analagous situation: headings are in
the first column and data is in rows:
http://www.chem.utoronto.ca/courseno...inPortion.html

Surprisingly enough, it appears to work!
Jul 8 '08 #3
This doesn't seem to work.

http://www.kunstwerk-jena.de/sommer_anm.html
http://www.kunstwerk-jena.de/default.css

Also tried the same with th.

Thanks,
Axel

Bjoern Hoehrmann wrote:
* Axel Siebenwirth wrote in comp.infosystems.www.authoring.stylesheets:
>I've tried to do this but it does not work.

table.anmeldung tr + td { font-weight:bold; }

This matches 'td' elements with a ('tr' sibling that is a child of a
(table element that belongs to the class 'anmeldung')). Since td and
tr do not occur as siblings, this matches nothing.
>I'm looking for an easy way to bolden the left column in this table:
http://www.kunstwerk-jena.de/sommer_anm.html

You might be looking for

table.anmeldung tr td:first-child { font-weight: bold; }

You might look into using the 'th' element instead though.
Jul 8 '08 #4
* Axel Siebenwirth wrote in comp.infosystems.www.authoring.stylesheets:
>This doesn't seem to work.

http://www.kunstwerk-jena.de/sommer_anm.html
http://www.kunstwerk-jena.de/default.css
Then you are probably using HTML where tr elements are not children of
table elements, but rather children of an often invisible tbody child,
so use

table.anmeldung tbody tr td:first-child { font-weight: bold; }
>Also tried the same with th.
I meant as element in the markup in place of <td>.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Jul 8 '08 #5
Bjoern Hoehrmann wrote:
* Axel Siebenwirth wrote in comp.infosystems.www.authoring.stylesheets:
>This doesn't seem to work.

http://www.kunstwerk-jena.de/sommer_anm.html
http://www.kunstwerk-jena.de/default.css

Then you are probably using HTML where tr elements are not children of
table elements, but rather children of an often invisible tbody child,
so use

table.anmeldung tbody tr td:first-child { font-weight: bold; }
Rather than use the *child* selector where you must have the exact
"lineage", you know that the TD must be a descendant of the TABLE so you
can get want you want simply with the *descendant* selector:

table.anmeldung td:first-child { font-weight: bold; }

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 8 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tony Benham | last post by:
I have been getting to grips with css recently (very slowly), and one area I have a problem is when to use class selectors or id selectors. Are there any guidelines when to use each type ? The key...
11
by: Sue Sims | last post by:
From <URL: http://www.w3.org/TR/CSS21/selector.html#id-selectors > I find the following text: "What makes attributes of type ID special is that no two such attributes can have the same...
4
by: Andy Fish | last post by:
hi, I am using descendent selectors to format cells within a table according to the css class of the table. However, when using nested tables, it seems to pick up the outer matching rule rather...
32
by: Will Hartung | last post by:
Can someone clarify that multiple classes in the "class" attribute are ok and "legal" and not some fluke? So, I can do: ..pink {color: pink} ..bold {font-weight: bold} ..medium {font-size:...
5
by: Andrew Poulos | last post by:
If I have an external stylesheet that is @imported into my page and it has an element that looks like this: * html td { font-style: italic; } how can I use javascript to change the font...
1
by: Joe | last post by:
I have a table with a student id and course id. I would like to make both fields the primary key since a student can have multiple course ids but I do not want duplicate records. How would I go...
7
by: Biguana | last post by:
Hi, Apologies in advance for a newbie question, but I'm trying to decipher css stuff, I can't find a direct parallel in web tutorials, and I'm not sure what to search on. My problem is that...
3
by: spolsky | last post by:
hi, it is possible to apply multiple styles as shown in the following example. <STYLE TYPE="text/css"><!-- BODY { background-color:salmon; } P { margin-left:20px; } .clsCode {...
7
by: John Dann | last post by:
I'm unclear as to how best to use what I'm terming the top-level CSS selectors, by which I mean selectors like *, html and body. I'm coming at this from trying to understand how best to set font...
5
by: Nathan Sokalski | last post by:
I'm not sure if this is the right place to ask this question, but I wasn't sure where else to go. I have a table made of the following tags: <table class="myclass"> <tbody> <tr><td>.</td></tr>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.