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


Hi,
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.
e.g.
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.Code:.no-boxshadow div { /* styles for browsers that don't support box-shadow */ }
www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge
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}
</style>
<ul id="foot_links">
<ul>
<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>
</ul>
thank you


You could add a class to the last list item and style it that way
If you don't want to add a class and you only have 4 links you could do this:
That should work in IE7+ (note that IE8 doesn't understand last-child either).Code:#foot_links li + li + li + li{border-left:0}
www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge
thanks a lot
it works very well
But should I care about ie6 ???


www.pmob.co.uk CSS FAQ 3 col demo Read My CSS Articles
Ultimate CSS Reference
Check out SitePoint's latest JavaScript challenge
Bookmarks