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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Incorrect div length

    Hey guys,
    I got this web page here: http://neopian.co.uk/coding/bb/
    The navigation bar should be 850px long. This is correct in IE. However, in Firefox, it's only as long as the actual menu.

    Any suggestions?

    Thanks

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,785
    Thanks
    8
    Thanked 131 Times in 129 Posts
    your links in the #mainnav are floated. the div is 850px but you cant tell because your not clearing the floats. IE clears automattically (incorrectly) so it looks right in it.

    http://www.positioniseverything.net/easyclearing.html
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #3
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    take this out of your html

    Code:
    <div id="mainnav">
    	<div class="mainnav_item"><a href="?p=home">Home</a></div>
        <div class="mainnav_item"><a href="?p=about">About Us</a></div>
    </div>
    make it look like this

    Code:
    <div id="mainnav">
    	<a href="?p=home">Home</a>
        <a href="?p=about">About Us</a>
    </div>
    that will fix it!!

  • #4
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by harbingerOTV View Post
    your links in the #mainnav are floated. the div is 850px but you cant tell because your not clearing the floats. IE clears automattically (incorrectly) so it looks right in it.

    http://www.positioniseverything.net/easyclearing.html
    Thanks, but if I remove the float, they end up one below each other. I've had a little look at that link, but using 'clear' doesn't really change any thing either.

    Sorry.

    @jcdevelopment: That would just remove the effect I'm after?
    Last edited by NeoPuma; 02-27-2008 at 11:15 PM.

  • #5
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Hmm, try
    Code:
    #mainnav {
      height: 25px;
    }
    Inline-blocks would be useful here, but Firefox < 3 doesn't support it

  • #6
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by CyanLight View Post
    Hmm, try
    Code:
    #mainnav {
      height: 25px;
    }
    Inline-blocks would be useful here, but Firefox < 3 doesn't support it
    Thank-you! That worked :P. Such a simple answer ><


  •  

    Posting Permissions

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