Soldato
- Joined
- 10 Apr 2006
- Posts
- 7,853
- Location
- North West
Did a quick search on here to check if there was such a post but i dont think there is so....
Using CSS to style my website, it looks perfectly fine in IE7 and FF.
But in any IE previous versions the layout is different and i cant seem to adjust it without moving the DIVs around in FF, thus messing up my layout
I was looking into using JS to detect what browser is running and then load an appropriate CSS file.
I have it working for IE but not Firefox sadly
Part of the code:
if (browser == ''){
if (navigator.appName.indexOf('Microsoft') != -1)
browser = 'IE'
else if (navigator.appName.indexOf('?') != -1)
browser = '?'
In the question marks what do i put for Firefox, Netscape is just 'Netscape', and just Firefox or Mozilla don't work, so i was wondering what is meant to be put there.
If not , then is there a page anywhere showing IE 6 "hacks" to stop the layout being moved across as i've tried altering the padding and margins but it doesn't seem to work without pushing everything over in Firefox.
(oh and i checked the website in Safari and the background colour on the site is different to the colour in FF and IE, any reason why?)
Using CSS to style my website, it looks perfectly fine in IE7 and FF.
But in any IE previous versions the layout is different and i cant seem to adjust it without moving the DIVs around in FF, thus messing up my layout

I was looking into using JS to detect what browser is running and then load an appropriate CSS file.
I have it working for IE but not Firefox sadly

Part of the code:
if (browser == ''){
if (navigator.appName.indexOf('Microsoft') != -1)
browser = 'IE'
else if (navigator.appName.indexOf('?') != -1)
browser = '?'
In the question marks what do i put for Firefox, Netscape is just 'Netscape', and just Firefox or Mozilla don't work, so i was wondering what is meant to be put there.
If not , then is there a page anywhere showing IE 6 "hacks" to stop the layout being moved across as i've tried altering the padding and margins but it doesn't seem to work without pushing everything over in Firefox.
(oh and i checked the website in Safari and the background colour on the site is different to the colour in FF and IE, any reason why?)