因此,我试图将图像放在无序列表旁边(图像充当导航的主页按钮),但实际列表不断向下移动,当我希望它成为下一个到家庭的形象。有想法该怎么解决这个吗?水平对齐无序列表旁边的图像
这是发生了什么:Image not aligned with the list
#navigation {
height: 50px;
width: 100%;
background-color: #2F4E6F;
}
#navigation li a {
text-decoration: none;
font-family: 'Open Sans';
font-size: 25px;
color: #FFFFFF;
}
#navigation li a:hover {
color: #7c7f84;
border-bottom: solid black 2px;
}
#navigation li {
list-style-type: none;
display: inline-block;
padding: 0 10px;
background-color: red;
}
#home_button {
width: 45px;
height: 45px;
display: inline-block;
margin-left: 10px;
margin-top: 2px;
}