Post #95,334
4/9/03 10:11:37 AM
|
anchor pseudo-class question
I'm trying to set up a stylesheet that allows for different sets of links colors depending on the style I'm using. For example, I'd like the h1 tags to have a dark green background, with the skip link showing up in yellow... but I want the rest of the document to have more legible link colors on the white background.
Is there a way to do this? So far my attempts have been unsuccessful. It looks as though a browser ignores an A:link, A:active, or A:visited description when you nest it in another style.
"We are all born originals -- why is it so many of us die copies?" - Edward Young
|
Post #95,343
4/9/03 10:30:17 AM
|
Show us the code.
Much easier to debug that way :)
Are you using child selectors? For example:
h1 a:visited { color: ugly }
Many fears are born of stupidity and ignorance - Which you should be feeding with rumour and generalisation. BOfH, 2002 "Episode" 10
|
Post #95,351
4/9/03 10:50:57 AM
4/9/03 10:51:34 AM
|
d'oh!
I didn't even *think* of doing it that way.
I had it set up as
h1 { font: somefont; color: #000000; background: #FFFFFF; a:link { color: ugly }; }
And the browsers would ignore it outright.
But you're saying I can have the h1 style, and then add another style called "h1 a:link", and the a:link style will inherit everything from the other?
"We are all born originals -- why is it so many of us die copies?" - Edward Young
Edited by cwbrenn
April 9, 2003, 10:51:34 AM EDT
|
Post #95,363
4/9/03 11:23:04 AM
|
Uh-huh. Next chapter: selectors.
[link|http://www.w3.org/TR/REC-CSS2/selector.html|http://www.w3.org/TR...SS2/selector.html]
You know you're going to read the whole document anyway...might as well start now. :)
Selection is done completely *before* the parameter block {}.
h1 a:link {} means "apply {} to all a:link's which are children of an h1 element".
Many fears are born of stupidity and ignorance - Which you should be feeding with rumour and generalisation. BOfH, 2002 "Episode" 10
|
Post #95,380
4/9/03 12:05:43 PM
|
W3C needs tech writers, badly
The specification, while it has all the information, is almost impossible to comprehend. For me, anyway. But I'm trying. :)
Actually, the spec is what made me give up and try and get started using Dreamweaver's tools in the first place, LOL.
"We are all born originals -- why is it so many of us die copies?" - Edward Young
|
Post #95,384
4/9/03 12:15:51 PM
|
Sound like are Volunteering?!
b4k4^2
[link|mailto:curley95@attbi.com|greg] - IT Grand-Master for President | [link|http://www.iwethey.org/ed_curry/|REMEMBER ED CURRY!] | [link|http://www.eweek.com/article2/0,3959,857673,00.asp|2004, the year Microsoft develops for Linux ] | Heimatland Geheime Staatspolizei reminds: The DHS [link|http://www.whitehouse.gov/pcipb/cyberspace_strategy.pdf|Cyberer-Stratergery]. The ultimate in Cyber. |
|
Post #95,398
4/9/03 1:18:06 PM
|
Not sure I have the time or mental capacity
Though it is tempting...
"We are all born originals -- why is it so many of us die copies?" - Edward Young
|
Post #95,479
4/9/03 6:12:16 PM
|
How odd.
I was just saying to myself after I posted that link what a joy it was to have such a readable, succinct, yet complete technical document. Really, I was. Hafta think about that one...
Many fears are born of stupidity and ignorance - Which you should be feeding with rumour and generalisation. BOfH, 2002 "Episode" 10
|
Post #95,546
4/9/03 8:35:08 PM
|
Well, it's very readible...
...by programmers. :)
"We are all born originals -- why is it so many of us die copies?" - Edward Young
|