Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9

Thread: Firefox blues

  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts

    Firefox blues

    Yup, I'm using IE as default and I know that I should code for FF, but that's too late now.

    I recently downloaded Firefox 2 to test out my site in it.
    It looks good, however there are some problems.

    1: The border around the whole layout is missing in FF. <-- PROBLEM FIXED!
    2: My drop-out menu dosn't display in FF (a javascript): <-- PROBLEM FIXED!

    3: Does IE and FF handle padding different? On this box I have set 5px padding to top, bottom and left. <-- PROBLEM FIXED!

    How would I come around these probs?
    Last edited by CaptainB; 07-08-2007 at 01:47 PM.

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    We really need to see the code in order to tell what the problem is. A link would be even better.

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts

  • #4
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by CaptainB View Post
    1: The border around the whole layout is missing in FF.
    A floated element should not by default expand its parent. In IE, due to a bug, it does anyway if the parent hasLayout such as the case is when an explicit width of height is specified. That is why your #container has zero height in Firefox (but not in IE6/7).

    My favorite method for float containment is using overflow: hidden
    Code:
    #container { 
    	width:981px;
    	margin-left:auto;
    	margin-right:auto;
    	border-style:solid;
    	border-width:1px;
    	border-color:#000000;
    	overflow: hidden;
    }

  • #5
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Ahh, that explains it. Thanks, it works with overflow:hidden;

  • #6
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by CaptainB View Post
    2: My drop-out menu dosn't display in FF (a javascript)
    This is actaully a JavaScript question. Anyway it looks like the script is broken. I don't know what this line is doing?
    Code:
    var ns6=document.getElementById&!document.all
    I have never heard about the &! operator? Perhaps there is something that I missed. In the mean time try to change that line to this:
    Code:
    var ns6=document.getElementById && !document.all

  • #7
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Wow, that's strange! I had never noticed that, don't know why it was missing. But it fixed my problem to add an extra "&".

    Again, thank you for your great help!

  • #8
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by CaptainB View Post
    3: Does IE and FF handle padding different? On this box I have set 5px padding to top, bottom and left.
    The problem seems to be the default margin for the form.

    The browsers default margin around the form element varies depending on where the form is placed in the source. There are differences between IE and FF. Then again, quirks mode is different too.

    It is probably a good idea to reset the form margin:
    Code:
    form {
      margin: 0;
    }
    Last edited by koyama; 07-08-2007 at 01:42 PM. Reason: typo

  • #9
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Holy moly!! I never knew that there was a tag to reset form margins! Wow!

    Thanks, problem fixed!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •