Page 1 of 1

Relative positioning IE vs Mozilla

Posted: Sat Apr 01, 2006 7:04 am
by EnacheVladian
I have a template who looks ok in Mozilla and bad in IE because IE read different the positioning.

any advices on how to work around without making 2 styles based on a split if (ie, mozilla) in almost every page ?
Thanks
(if im unclear please let me know)

Posted: Thu Apr 06, 2006 8:17 pm
by Flipper3
Here use this code:

Code: Select all

<script>
// Browser Specefic Skins
// No additional copyrights may be added.
// © Chiên
// Provided By http://forums.distantstars.net
B = navigator.userAgent
if(B.indexOf("MSIE 6.0") !=-1) {
****.write("<LINK REL='stylesheet' TYPE='text/css' HREF='URL OF I.E. SKIN'>")
}
if(B.indexOf("Fire Fox") !=-1)  {
****.write("<LINK REL='stylesheet' TYPE='text/css' HREF='URL OF FIREFOX SKIN'>")
}
if(B.indexOf("Opera") !=-1) {
****.write("<LINK REL='stylesheet' TYPE='text/css' HREF='URL OF OPERA SKIN'>")
}
</script>
It is not my code, the copyright is in there and here is the link from where I got it:

http://support.invisionfree.com/index.p ... pic=245915

Posted: Fri Apr 07, 2006 2:30 pm
by jasondsouza
hey
thankx for the script
i was trying to make such a script from the last ten days

Posted: Sat Apr 15, 2006 8:52 pm
by Anthony Case
You can also use the * html command which only IE browsers read.

#nav { padding: 0 8px; background:url(design/navbg.gif); }
* html #nav { margin-bottom: -3px; }

In this example, only IE based browsers would add the -3 margin.