Css 我的导航系统无法正常工作

Css 我的导航系统无法正常工作,css,Css,嘿,伙计们,我是网页设计新手,但我无法让我的导航在顶部对齐,也无法从li中删除项目符号。我已经解决了它,但是它开始干扰页面的其余部分,所以我重新修改了一些,现在无法让它工作。任何帮助都将不胜感激 .menuitem { list-style-type: none; text-align: center; color: #fff; text-decoration: none; width: 240px; } #navigation { width:

嘿,伙计们,我是网页设计新手,但我无法让我的导航在顶部对齐,也无法从li中删除项目符号。我已经解决了它,但是它开始干扰页面的其余部分,所以我重新修改了一些,现在无法让它工作。任何帮助都将不胜感激

.menuitem {
    list-style-type: none;
    text-align: center;
    color: #fff;
    text-decoration: none;
    width: 240px;
}

#navigation {
    width: 1000px;
    background-color: #0b61a4;
    font-size: 18pt;
}

nav a:visited{
    text-decoration: none;
    width: 240px;
    float: left;
    margin-left: -20px;
    margin-bottom: -6px;
}

nav a:hover {
    color: #CED9D9;
    text-decoration: none;
    width: 240px;
    float: left;
    margin-left: -20px;
    margin-bottom: -6px;
}

nav a:link{
    text-decoration: none;
    width: 240px;
    float: left;
    margin-left: -20px;
    margin-bottom: -6px;
}

nav a:active {
    text-decoration: none;
    width: 240px;
    float: left;
    margin-left: -20px;
    margin-bottom: -6px;
}
HTML



像这样的东西怎么样


你能显示你的HTML标记吗?@Barbara Laird这是导航的代码很抱歉很难阅读,无法将其正确格式化`
  • /ul>`我得玩一会儿,使它看起来正确,但这让它开始为我格式化。谢谢我不得不稍微修改一下,但是代码现在工作起来就像我想要的一样,再次感谢你!
    <div id="navigation">
      <ul>                 
        <li><a href="index.html" class="menuitem">Home</a></li>                 
        <li><a href="pharmacy_solutions" class="menuitem">Pharmacy Solutions</a></li>                 
        <li><a href="about_us.html" class="menuitem">About Us</a></li>                 
        <li><a href="contact_us.html" class="menuitem">Contact Us</a></li>             
      </ul>         
    </div>
    
    #navigation {
        width: 1040px;
        background-color: #0b61a4;
        font-size: 18pt;
    }
    
    #navigation ul{
        list-style-type: none;
        text-align: center;
        color: #fff;
         display:inline-block;
    }
    #navigation ul li {
         display:inline-block;
         width: 240px;
        margin-bottom: -6px;
    }
    
    #navigation ul li a {
        color: #fff;
        text-decoration: none;
    }
    
    #navigation ul li a:hover {
        color: #CED9D9;
    
    }