Question

I'm having a very weird problem that for the life of me I can solve. Basically, in Safari my top navigation has no top margin and is flush with the very top of the page. In firefox, it is applying the bottom margin to the top as well, for a reason I cannot figure out. When I remove margin in firebug, the fake top margin is also removed.

Please, just goto the page in firefox to see what I mean. If you have firebug, disable the margin property on the #main-navigation and you'll see what is happening.

EDIT: Forgot to include link to site: Link

Here's the code:

<body>
  <div id="page-wrap">
    <ul id="main-navigation">
     <li><a href="/" id="home-link<?php if (is_home()) { echo '-active'; } ?>" class="main-nav-link">Home</a></li>
     <li><a href="/is" id="about-link<?php if (is_page("About")) { echo '-active'; }  ?>" class="main-nav-link">About</a></li>
     <li><a href="/discusses" id="articles-link<?php if (is_page("Articles")) { echo '-active'; } if (is_single()) { if (in_category( 3, $post->ID )){ echo '-active'; } } ?>" class="main-nav-link">Articles</a></li>
     <li><a href="/does" id="portfolio-link<?php if (is_page("Portfolio")) { echo '-active'; } if (is_single()) { if (in_category( 4, $post->ID )){ echo '-active'; } } ?>" class="main-nav-link">Portfolio</a></li>
     <li><a href="/listens" id="contact-link<?php if (is_page("Contact")) { echo '-active'; } ?>" class="main-nav-link">Contact</a></li>
     <li><a href="/rss" id="feeds-link" class="main-nav-link">Feeds</a></li>
     <div class="clear"></div>
    </ul> 

And the CSS:

body {
 font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Trebuchet, sans-serif; font-size: 13px; color: #2a2a2a;
 border-top: 4px solid #f2f2f2;
 }

#page-wrap { width: 600px; margin: 0 auto; }

#main-navigation { display: block; position:relative; clear: both; margin: 0 -10px 48px -10px; }
 #main-navigation li { float: left; height: 30px; }
  #main-navigation li a { display: block; cursor: pointer; margin-right: 28px; height: 30px; text-indent: -9999px; background: url(/images/storminkSprite.png) no-repeat; background-color: transparent; }

I really have no idea what to do anymore, I've been trying to fix this one problem all day and I'm completely out of ideas, so I really hope someone can help.

Was it helpful?

Solution

it seems that the margin propriety is acting wierd..it must be something in the code though.. the quick fix would be to add the padding propriety

#main-navigation { display: block; position:relative; clear: both; margin: 0 -10px 0 -10px; padding-bottom:48px; }

this works fine to me

OTHER TIPS

#main-navigation {margin-bottom:0px!important;}

you could try using

padding-bottom: 45px and margin-left: -10px

I have no clue as to why margin is doing that but this quick workaround should be fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top