开发者

Horizontal navigation position problem with Firefox

开发者 https://www.devze.com 2023-03-14 23:37 出处:网络
I\'m designing a website (newbie) and I came across this problem with horizontal navigation menu in Firefox that I am stuck with.

I'm designing a website (newbie) and I came across this problem with horizontal navigation menu in Firefox that I am stuck with.

This is how it looks like in the latest Safari, Chrome, Webkit (OS X): http://i.imgur.com/iMDyO.png

This is how it looks like in Firefox 5 (OS X): http://i.imgur.com/Bp4y0.png

Here's my CSS, I've had some problems using pseudo-elements, therefore the fold-ends of the "ribbon" is a background image

.mod_menu {
width:940px;
height:50px;
background-image:url("tl_files/images/navbg.png");
background-repeat:repeat-x;
}

.mod_menu ul {
margin:10px 0 0 15px;
padding:0; 
}

.mod_menu li {
position:relative;
float:left;
border-right:1px solid #247db8;
list-style-type:none;
border-left: 1px solid #005c8e;
}

.mod_menu li a {
display:block;
padding:5px 25px;
font-family:Helvetica, Arial, sans-serif;
font-size:10pt;
color:#ffffff;
text-decoration: none;
text-shadow: 0px -1px 1px #092c47; 
}

Here's the HTML:

<div id="wrapper">
    <div id="header">
        <div class="inside">
            <div id="logo">
            <a href="/index.html">
                <img src="tl_files/images/logo_f.png" alt="Logo" />
            </a>
            </div>
            <div class="mod_quicklink block">
            <ul>
                <li><a href="kontakt.html">Kontakt</a></li>
                <li><a href="prihlaseni.html">Přihlášení</a></li>
                <li><a href="registrace.html">Registrace</a></li>
            </ul>
            </div>
            <div class="mod_navigation mod_menu block">
            <a href="#skipNavigation1" class="invisible">Přeskočit navigaci</a>
            <ul class="level_1">
                <li class="active first"><a href="index.html"  class="first">RL - Corpus</a>
                <img id="drop" src="tl_files/img/drop.png" alt="" /></li>
                <li class="sibling"><a href="novinky.html" title="Novinky" class="sibling">Novinky</a></li>
                <li class="sibling"><a href="zdravotnicka-cinnost.html" title="Zdravotnícka Činnost"                class="sibling">Zdravotnícka činnost</a&g开发者_如何学运维t;</li>
                <li class="sibling"><a href="skolici-cinnost.html" title="Školíci Činnost" class="sibling">Školíci činnost</a></li>
                <li class="sibling"><a href="metoda-v-vojty.html" title="Metoda V. Vojty" class="sibling">Metoda V. Vojty</a></li>
                <li class="sibling last"><a href="kontakt.html" title="Kontakt" class="sibling last">Kontakt</a></li>
            </ul>
            <a name="skipNavigation1" id="skipNavigation1" class="invisible">&nbsp;</a>
            </div>
        </div>
    </div>
</div>


Try adding clear: left to the class .mod_menu. Your logo is floated up to the left, without clearing the floats then you mod_menu will try and continue on the same line (at least in Firefox). I would also recommend Firebug.


You need to clear your floats.

Adding clear:both; to the div with the class mod_navigation mod_menu block fixed it in firebug.

0

精彩评论

暂无评论...
验证码 换一张
取 消