如您所见,我的导航栏有问题。图像被切断(与文本保持一致),我不知道如何修复它。
<ul class="navigation">
<li class="navbar"><a href="index.html" class="navbarlink" ><em class="home"/><b>Home</b></a></li>
<li class="navbar"><a href="second.html" class="navbarlink"><em class="photos"/><b>Photos</b></a></li>
<li class="navbar"><a href="index.html" class="navbarlink"><em class="projects"/><b>Projects</b></a></li>
<li class="navbar"><a href="index.html" class="navbarlink"><em class="about"/><b>About</b></a></li>
<li class="navbar"><a href="index.html" class="navbarlink"><em class="contact"/><b>Contact</b></a></li>
</ul>
CSS:
.navigation {
background:#1841c8 url(Navigation/Navigation/nav_background.png);
height:40px;
margin-bottom:0px;
display:block;
}
.navbar {
display:inline-block;
line-height: 40px;
margin-right:40px;
}
.navigation .navbar .navbarlink{
color:#FFFFFF;
padding: 11px 5px 11px;
}
.navigation .navbar .navbarlink b{
padding-left:40px;
padding-right:5px;
}
.navigation .navbar .navbarlink:hover{
color:#00CCFF;
background: url(Navigation/Navigation/nav_hover.png);
text-decoration:none;
padding: 11px 5px 11px;
}
/*Navigation bar icons*/
.navigation .navbar .navbarlink em.home{
background-image: url(Navigation/Icon_images/home.png);
background-repeat: no-repeat;
}
.navigation .navbar .navbarlink em.photos{
background-image: url(Navigation/Icon_images/Photo.png);
background-repeat: no-repeat;
}
.navigation .navbar .navbarlink em.projects{
background-image: url(Navigation/Icon_images/projects.png);
background-repeat: no-repeat;
}
.navigation .navbar .navbarlink em.about{
background-image: url(Navigation/Icon_images/about.png);
background-repeat: no-repeat;
}
.navigation .navbar .navbarlink em.contact{
background-image: url(Navigation/Icon_images/Contact.png);
background-repeat: no-repeat;
}
如果有人能帮我解决它会很高兴!