467,169 Members | 1,075 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,169 developers. It's quick & easy.

What does "th.locked" mean?

I have inherited a stylesheet at work, with the designer no longer
working here.

In an external stylesheet it says:
thead th, thead th.locked
{
position:relative;
}

What does it mean? That for all "THEADs" and "THs" and "THs that are
of class 'locked'" to position relative?

Would

thead, th
{
position:relative;
}

do the same thing?

Is "th.locked" necessary?

Thanks,
Ann

Feb 14 '06 #1
  • viewed: 5258
Share:
4 Replies
Giggle Girl wrote:
thead th, thead th.locked
{
position:relative;
}

What does it mean? That for all "THEADs" and "THs" and "THs that are
of class 'locked'" to position relative?
No, it assigns position:relative to all such TH elements that appear
inside a THEAD element
Is "th.locked" necessary?


Generally, no, and probably the code has some redundancy. But it is
impossible to say this for sure without knowing all the relevant facts.
The use of a selector like thead th.lock (which has higher specificity
than thead th) _might_ matter in the cascade.

Then again, the whole rule looks odd. Why use a table _and_ positioning?
Feb 14 '06 #2
So "locked" a "keyword" is CSS?

It is not some made-up name the designer created?

Thanks,
Ann

Feb 14 '06 #3
Giggle Girl wrote:
So "locked" a "keyword" is CSS?

It is not some made-up name the designer created?


No, it *isn't* a keyword. It's after a period, which means that it will
be used to select elements having class="locked"--in particular, in this
situation:

<thead><th class="locked">

You need to review the rules for what selectors mean--you seem to be
confusing the respective meanings of spaces, commas, and periods in a
selector.
Feb 14 '06 #4
Giggle Girl wrote:
So "locked" a "keyword" is CSS?
No.
It is not some made-up name the designer created?


It's a class name, so yes it was invented by a designer.

th.locked is the CSS selector for the HTML <th class="locked">.

Please quote the message you are replying to. Not everyone will have
acopy of the previous messages in the thread so you post will make
little sense to them.

Steve

Feb 14 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jack | last post: by
4 posts views Thread by Zorpiedoman | last post: by
1 post views Thread by =?Utf-8?B?R29yZG9uUw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.