/    Sign up×
Community /Pin to ProfileBookmark

IE6 and first-child

I realize that IE6 does not support the CSS first-child selector. I was just wondering if there was a work around for this, or a hack that would work to give IE6 the same functionality as other browsers have with first-child.

Using in all other browsers:

[CODE]#subnav ul li:first-child a[/CODE]

I need to do something similar but only for IE6. I have seen some examples that use an expression in the ie6.css file, but I am not sure if that will work here.

Any ideas are appreciated!

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@Declan1991Jul 07.2008 — Easiest way (with the least hassle), is to use a class because generally it's only on one or two uls.
Copy linkTweet thisAlerts:
@nnhubbardauthorJul 07.2008 — Easiest way (with the least hassle), is to use a class because generally it's only on one or two uls.[/QUOTE]

Well, in our case it is about 60 different uls! ?
Copy linkTweet thisAlerts:
@Declan1991Jul 07.2008 — How important is it? You can use JavaScript to add the class, and then it will work in all browsers, except IE 6 and less with JavaScript disabled.
×

Success!

Help @nnhubbard 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...