Not sure if this is possible or not but I need to apply one style to IE5+ and another to Opera and Gecko based browsers.
For IE I want to set margin-bottom: -75px and others padding-bottom: -75px
Is this possible using some kind of css hack?
| SitePoint Sponsor |





Not sure if this is possible or not but I need to apply one style to IE5+ and another to Opera and Gecko based browsers.
For IE I want to set margin-bottom: -75px and others padding-bottom: -75px
Is this possible using some kind of css hack?


Hi Darren,
You can use the star selector for ie and all the rest get the basic styles.
Or you can use the child selector for gecko/opera.
Or do you want one for each?
orCode:* html #elementname {margin-bottom:-75px}/* for ie*/ html>body #elementname {padding-bottom:-75px}
I'm wondering why you need it and perhaps theres another valid way to do this without hacks?Code:#elementname {margin-bottom:0;padding-bottom:-75px} * html #elementname {margin-bottom:-75px;padding-bottom:0}/* for ie*/
Paul





It's the headline replacement on that template you've been helping me with m8. Tis a long explanation, everything works but in Opera the text is showing on hover for the background images. If I set padding rather than margin to -75px Opera is ok with it.


Ok - long as it works![]()





Does now ta![]()
Bookmarks