Forums
View unanswered posts | View active topics It is currently Tue Nov 25, 2014 7:27 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:
Code:
li {
   background:green;
   border-radius:15px;
   behavior:url(./templates/BoxyBuzz/css/PIE.htc);
}
li:first-child {
   background:orange;
}

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


Fri Jul 30, 2010 10:49 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
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 http://github.com/lojjic/PIE/issues/issue/54 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
Profile

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:
Code:
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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 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.