CSS-标题图像下方的对齐菜单选项

CSS-标题图像下方的对齐菜单选项,css,Css,我对这个很陌生,但我已经创建了一个标题图像和菜单选项,并保存为.png图像 但是,我无法让菜单图像与屏幕左侧对齐,而不是挂在徽标边缘 以下是小提琴的链接: 下面是我的代码(如果不是那么好的话,我很抱歉) 希望你能帮忙 谢谢菜单当前被推到右侧,远离屏幕左侧,因为它有左填充。如果将其移除,它们将在左侧对齐 我的回答解决了你的问题吗?嗨,对不起,我刚回到电脑上。如果我从标题中删除我的图像,则更改会起作用。然而,当图像出现时,菜单仍然只位于右侧。在我链接到的小提琴中,菜单与左侧对齐,有图像和没有图像。

我对这个很陌生,但我已经创建了一个标题图像和菜单选项,并保存为.png图像

但是,我无法让菜单图像与屏幕左侧对齐,而不是挂在徽标边缘

以下是小提琴的链接:

下面是我的代码(如果不是那么好的话,我很抱歉)

希望你能帮忙


谢谢

菜单当前被推到右侧,远离屏幕左侧,因为它有
左填充
。如果将其移除,它们将在左侧对齐


我的回答解决了你的问题吗?嗨,对不起,我刚回到电脑上。如果我从标题中删除我的图像,则更改会起作用。然而,当图像出现时,菜单仍然只位于右侧。在我链接到的小提琴中,菜单与左侧对齐,有图像和没有图像。至少在Firefox和Chrome上是这样。你在用什么浏览器?嗨,谢谢你的帮助。这引起了我的思考,我把导航栏的顶部填充改成了一个更大的数字,让它位于徽标下面。我很高兴为您服务。如果您认为有帮助,请单击复选标记或向上箭头?谢谢
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="C:\Users\Laura-Jayne\Documents\Crestel Website\cake\html\style.css" type="text/css">
<title>Cupcake Fairy</title>
</head>

<body>
<div id="header-container">
    <div id="header">
        <div id="logo">
        <a href="#"><img src="C:\Users\Laura-Jayne\Documents\Crestel Website\cake\images\logo.png" /></a>
        </div>

        <div id="topnav">
        <ul>
    <li><a href="#"><img src="C:\Users\Laura-Jayne\Documents\Crestel Website\cake\images\home.png" alt="home" /></a></li>
            <li><a href="#"><img src="C:\Users\Laura-Jayne\Documents\Crestel Website\cake\images\about.png" alt="about" /></a></li>
            <li><a href="#"><img src="C:\Users\Laura-Jayne\Documents\Crestel Website\cake\images\gallery.png" alt="gallery" /></a></li>
            <li><a href="#"><img src="C:\Users\Laura-Jayne\Documents\Crestel Website\cake\images\contact.png" alt="contact" /></a></li>
        </ul>
        </div>
    </div>
</div>
@charset "utf-8";

body {
margin: 0px;
padding: 0px;
}

#header-container {
width: 100%;
height: 204px;
background-color: #e7fc56;
}

#header {
background-image: url("C:\Users\Laura-Jayne\Documents\Crestel Website\cake\images\header.png");
background-repeat: no-repeat;
width: 1024px;
height: 204px;
margin: auto;
}

#logo{
float: left;
padding-top: 15px;
padding-left: 160px;
}



img {
border: none;
}

#topnav {

margin: auto;
height: 76px;
width: 1024px;
padding-top: 150px;
padding-left: 158px;
}



#topnav ul li
{
display: inline;
padding: 0px;
margin: 0px;
width: 100px;
}

#topnav ul a {
text-decoration: none;
background: #e7fc56
float: left;
text-align: left;
}
#topnav {
    margin: auto;
    height: 76px;
    width: 1024px;
    padding-top: 150px;
}