Jeremy Boggs schrieb:
I'm trying to create a navigation bar using images as tabs, and using
the conditional descendant selectors to choose the "current" link. I
have an unordered list of four links:
...
the a tag's background image is 80px high. the non-current state as a
background position of 0 0, with a height of 40px. to display the
"current" link, I put an id in the UL tag and change the background
position of the relevant a tag to 0 -40px. this works fine in Safari,
but in no other browser.

I also change the background-position to 0 -40px on the a:hover state,
which works fine in all the browsers I've checked, so I'm thinking
that I'm doing something wrong with the descendant selector. but it's
weird that Safari recognizes it.

Both the CSS and XHTML are valid. Here's the link to the page:

http://chnm.gmu.edu/history120/new/nav-test.html

this is the ruleset for your current state

#pre18thcentury a#nav-pre18,
#18thcentury a#nav-18,
#19thcentury a#nav-19,
#20thcentury a#nav-20 {
background-position:0 -40px;
}

this is what Firefox Java script console says:

"Error: Expected identifier for ID selector but found '#18thcentury'. Ruleset ignored due to bad selector.
Source File: http://chnm.gmu.edu/history120/new/nav-test.html
Line: 85"

Ingo

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to