Selectivizr & Modernizr

I wonder if I can used both (Selectivizr) and ( Modernizr) in my page without causing any problems?
Should I use only one of these js file
Thank you


I don’t use either but as far as I understand them then Modernizr adds classes to the html element which you can then use in your css to supply alternate rules when you use the newer features of css3.


.no-boxshadow div { /* styles for browsers that don't support box-shadow */ }

Selectivizr on the other hand emulates some CSS3 pseudo-classes and attribute selectors for use in Internet Explorer 6-8. You don’t need to do anything else such as add special classes as your original css will just work. Therefore there should be no conflict with Modernizr as Modernizr doesn’t really change anything at all as you still have to manually add the classes where needed.

I want to use Selectivizr only to emulates CSS3 pseudo-classes specially :last-child , because when I test my site (in ie 7) the footer looks messy.
Is there any alternative way to do the same thing without adding Selectivizr ?

<style type=“text/css”>
#foot_links li { margin:0 10px 7px; border-left:1px solid #000; padding-left:10px; display:inline; position:relative;}
#foot_links li:last-child { border-left:0}
<ul id=“foot_links”>
<li><h3><a href=“#”>home</a></h3></li>
<li><h4><a href=“#”>sub1</a></h4></li>
<li><h4><a href=“#”> sub2</a></h4></li>
<li><h4><a href=“#”> sub3</a></h4></li>
thank you

You could add a class to the last list item and style it that way :slight_smile:

If you don’t want to add a class and you only have 4 links you could do this:

#foot_links li + li + li + li{border-left:0}

That should work in IE7+ (note that IE8 doesn’t understand last-child either).

thanks a lot
it works very well
But should I care about ie6 ???

Only if you have a uniquely high proportion of IE6 users. IE6 is dead in the water these days and i don;t support it. However the fact that IE6 gets an extra border is not worth worrying about anyway.:slight_smile: