View unanswered posts | View active topics It is currently Sun Jan 19, 2020 3:20 pm

Reply to topic  [ 3 posts ] 
 IE :first/last-child overwritten 
Author Message

Joined: Fri Jul 30, 2010 10:43 am
Posts: 5
Post IE :first/last-child overwritten
I have the following CSS:
li {
li:first-child {

All LIs will have a background of green, and the first-child which is orange was ignored.

Fri Jul 30, 2010 10:49 am

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1452
Post Re: IE :first/last-child overwritten
Oh, very interesting! I hadn't thought of this since I never use the :first-child pseudo-class due to IE6's lack of support.

The way PIE works is it inserts an element as previous-sibling to the target element. So all of a sudden, PIE's element is the first-child rather than your first li element!

I can't think of any way around this at the moment. I've opened ticket so it's logged as a known issue. It may end up going into the documentation as an unavoidable caveat.

Fri Jul 30, 2010 9:18 pm

Joined: Sat Oct 09, 2010 12:00 pm
Posts: 2
Post Re: IE :first/last-child overwritten
The problem is easily fixed if you add an additional selector to your CSS:
css3-container:first-child + li, li:first-child {background:orange;}

I don't think a fix in PIE is worth the effort.

btw: BIG THANK YOU, jason - PIE is awesome!

Sat Oct 09, 2010 12:24 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.