Do you mind if I ask what you specifically want to show only to Firefox users? If it's just a way to make something display better on FF there's probably an easier and better way to accomplish it.
__________________ l Search Engine Friendly Web Design | Please login or register to view this content. Registration is FREE
l Tips On Marketing, SEO, Design, and Development | Please login or register to view this content. Registration is FREE
So far I have only tested my site on firefox, aol, and IE and It appears how I want it to on IE and AOL, but different in Firefox so I want to load a different page with the corrections in the CSS to make It work In Firefox.
<SCRIPT language=”JavaScript”>
var browserName=navigator.appName;
if (browserName==”Microsoft Internet Explorer”)
{
//load ie friendly stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesie.css” type=”text/css”>’)
}
else
{
if ((parseFloat(navigator.appVersion)) >= 5 )
{
// if ns version is great than or equal to 5 (6) load this stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesie.css” type=”text/css”>’)
} else {
//if you have a really ancient browser (ie. NS 4.7 or earlier) load this stylesheet
document.write(’<link rel=”stylesheet” href=”/stylesns.css” type=”text/css”>’)
}
}
</SCRIPT>
I had a hunch that might be what you were trying to do. Post the code or a link to the page and I'm sure we can help getting the css right to display well across browsers. It's better approach.
When developing I find it's easiest to code to the standards and get things working in Firefox first. Periodically check how the page looks in IE and make a few fixes. In the end you shouldn't need to have more than a half dozen to a dozen lines of css that need to be different for the different browsers (mainly IE) and the best way to deal with them is through conditional comments.
__________________ l Search Engine Friendly Web Design | Please login or register to view this content. Registration is FREE
l Tips On Marketing, SEO, Design, and Development | Please login or register to view this content. Registration is FREE
I usually find it's easiest to code with both IE and FF (and now Safari for Windows) open. That way, if I can nail all three of those at once, then I'll be fine.
James, if your issues are IE-specific, you may want to look at conditional comments. Conditional comments are viewed and processed by IE (you can even make it version-specific) while the other browsers ignore them completely.
Try to avoid going that route if you can, though. It gets messy if you're not careful.
Actually I do the same or at least similar as Adam. I use a lot of extensions for Firefox while developing so that's the one that's primarily open, but I do check in IE after each section of code I write and it's never more than a click away.
__________________ l Search Engine Friendly Web Design | Please login or register to view this content. Registration is FREE
l Tips On Marketing, SEO, Design, and Development | Please login or register to view this content. Registration is FREE