Creating neat external link icons AND being W3C friendly
-
Barrowed from the NuclearMoose (thanks, btw — check’s in the mail), I snatched this piece of CSS for my site.
—
/* External links */
#rightCol a[href^="http:"] {
background: url(/images/TornPaper/extlink.gif) right center no-repeat;
padding-right: 10px;
}
#rightCol a[href^="https://stephen.yeargin.com"] {
background: inherit;
padding-right: 0px;
}—
[Note: #rightCol is where my posts go, instead of #container. Pretend it’s universaly applied.]
Not only is it not working on my browser (Firefox), but it’s also failing on the CSS validator. From what I’ve read so far, the selector property hasn’t dried yet from it’s RC state.
The readout:
Combinator *= between selectors is not allowed in this profile or version
So to get to the point of this, I’ve implemented the external icon link as a class (
class='extlink'
)before, but it put an ugly underline all the way under the icon. I want to get rid of this and stay current-standards compliant. Any thoughts?
- The topic ‘Creating neat external link icons AND being W3C friendly’ is closed to new replies.