HELP - Problems with Firefox display of page
rat
Status: New User - Welcome
Joined: 26 Mar 2005
Posts: 4
Reply Quote
Um I got a problem anyways if anyone could make a quick script I could put into the head of a page that would redirect anyone using firefox to "#" url that would be a great help to me.

<mod edit>no email addresses, this is for your protection, otherwise email harvestors will grab your email</edit>
Back to top
erikZ
Status: Contributor
Joined: 30 May 2004
Posts: 148
Reply Quote
rat, welcome to the forums. Someone would probably be willing to help you with a script you are having problems with, but in general, speaking for myself, I won't write a script for you. You have to put out some effort, then I'd be happy to help.

The logic of the script is easy, I'll give you the pseudocode:

:: Code ::
include ('browser_detection.php');
$browser = browser_detection('browser');
if ( $browser == 'moz' )
{
header('Location: /your-mozilla-page.php');
}
else
{
whatever else you want to happen;
}

If you want to do specific firefox, and not generic mozilla gecko detection, you'd have to check the mozilla return array as well.
Back to top
rat
Status: New User - Welcome
Joined: 26 Mar 2005
Posts: 4
Reply Quote
thanks for that, I new to this all and really havent learned much java yet so thats why im here, I really hate how fire fox messes my pages up and IE doesnt

If you got fire fox go here and youll see what I mean [new user link]

I just want a temporary solution till I can figure how to make it work
Back to top
erikZ
Status: Contributor
Joined: 30 May 2004
Posts: 148
Reply Quote
Ok, I see the problem, this isn't a programming issue, it's a validation issue.

Take a look at your HTML Validation here

And your CSS validation here

You're using HTML <!-- --> within the CSS, which causes a parse error, those are not allowed within <style>, only outside of them

Correct CSS commenting must be in this format:
:: Code ::
<style type="text/css">
/* your comments */
body { font-size:12px;}/* and so on */
</style>


That's for on page styles, same commenting syntax if you are using a linked CSS library file, except of course you don't use the <style> tags.

You aren't using a doctype, with what you're trying to achieve, you MUST have your pages validate in order to properly debug. Firefox is almost always showing you what your code is really doing, IE will let you get away with huge mistakes, which then will show as such in real browsers. Develop in Firefox, debug for IE and the rest and your life will be much easier.

By the way, my guess is that your pages don't only fail on Firefox, they fail on all other non-MSIE browsers, so that detection won't really do what you want it to do anyway.

Fix the CSS, fix the HTML, then see if you still have a problem. Test in Firefox, not MSIE and you'll find your development and debugging time drop radically, plus you'll learn all the MSIE bugs along the way. Most CSS display errors, by the way, are not Firefox/Safari/Mozilla etc bugs, they are showing you what you coded.
Back to top
rat
Status: New User - Welcome
Joined: 26 Mar 2005
Posts: 4
Reply Quote
Good God X_x I'm gonna be working on this for a long time it looks like. Thanks for the help
Back to top
erikZ
Status: Contributor
Joined: 30 May 2004
Posts: 148
Reply Quote
If you have CSS or HTML questions you can't figure out, feel free to ask in the HTML/CSS forum and somebody will try to give you hand.

Post relevant code sample, but please don't post the entire page's code, that's too hard to read through.
Back to top
rat
Status: New User - Welcome
Joined: 26 Mar 2005
Posts: 4
Reply Quote
lol, yeah thanks
Back to top
Display posts from previous:   

All times are GMT - 8 Hours