www.webdeveloper.com
Results 1 to 7 of 7

Thread: Weird 5px Space On Top of Logo in FireFox & Chrome

  1. #1
    Join Date
    May 2007
    Posts
    18

    Weird 5px Space On Top of Logo in FireFox & Chrome

    Hi All! The page is at http://www.prairiefirewinery.com/index-new.html and the CSS at http://www.prairiefirewinery.com/new.css. The problem is in FireFox & Chrome (it looks fine in IE) the lower part of the logo (the part that says 'Prairie Fire Winery' that's in the white area) is pushed down by 5 px -- so a thin white line separates it from the top part of the logo. I have gone over the css a tone of times and tried EVERYTHING I could think of to get rid of the 5px space (even adding a negative 5 px) and NOTHING works -- it's driving me NUTS!! Does anyone have any idea what the problem is?

    TIA!!!

  2. #2
    Join Date
    Mar 2011
    Posts
    1,136
    I expect that its the difference in the default margin on the <img> tag that's differs between IE and the other browsers. Try:
    Code:
    img { margin:0; }
    If that fixes it, you should consider using Eric Myer's CSS Reset stylesheet. It clears the margin and padding on most tags and helps cross-browser compatibility. Good luck!
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    May 2007
    Posts
    18
    Thank you so much for trying! I added the 0 margin to the image and it didn't work. This is just the weirdest thing!

  4. #4
    Join Date
    Jun 2012
    Posts
    6
    Nice!!!

  5. #5
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,459
    Hi there rachell,

    The gap is not at the top of the "logoBottom.gif", but, actually, at the bottom of the "logoTop.gif".

    It is caused by the default vertical alignment of inline elements.

    One of a few possible cures, is to add this to your CSS...
    Code:
    
    #navigation img {
        display:block;
     }
    This site...

    ...may help to give you a better understanding of this very common problem.

    coothead

  6. #6
    Join Date
    May 2007
    Posts
    18
    My Hero!!!! I was so focused on the logo div it never occurred to me the problem could be coming from the navigation -- I can't thank you enough!!!

  7. #7
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,459
    No problem, you're very welcome.


    coothead

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles