/    Sign up×
Community /Pin to ProfileBookmark

css selectors, cross browser.

Any reason in particular why this:

[code] #ml a:link,visited,hover,active { [/code]

only works in Netscape 7 and not Fire Fox 0.9.3, IE6 and Opera 7.54 ?

I’m guessing it’s something wrong with my code rather than a browser error seeing as only one of them is effecting the right links. So what’ve I screwed up this time?

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@VladdySep 01.2004 — According to http://www.w3.org/TR/CSS21/selector.html#q2 it should not work
Copy linkTweet thisAlerts:
@Paul_JrSep 01.2004 — Actually there isn't a thing wrong with the code, but it probably isn't doing what you want it to do. ?

Right now, it will apply whatever your styles to any a:link that is a child of an element with the id of "ml", to the elements visited, hover, and active, as well.

What you probably want is this:
<i>
</i>#ml a:link, #ml a:visited, #ml a:hover, #ml a:active {
Copy linkTweet thisAlerts:
@Stephen_PhilbinauthorSep 02.2004 — Yeah. In NN it affects all links that are children of "ml", regardless or state.

In other browsers however, they are not identified.
×

Success!

Help @Stephen_Philbin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...