我正在构建一个垂直导航栏,无法根据需要格式化图像旁边的文本。我可以使用边距操纵图像。我在我想要的地方得到了它。现在,我尝试操纵文本边距,但没有任何效果。看起来是这样的......
HTML:
<div class="content_nav">
<div class="content_nav_item"><a href="#"><img src="images/icon.jpg" height="60px" width="60px" alt="One"><span class="content_nav_item_text">One</span></a></div>
<div class="content_nav_hr"> </div>
<div class="content_nav_item"><a href="#"><img src="images/icon.jpg" height="60px" width="60px" alt="One"><span class="content_nav_item_text">One</span></a></div>
<div class="content_nav_hr"> </div>
<div class="content_nav_item"><a href="#"><img src="images/icon.jpg" height="60px" width="60px" alt="One"><span class="content_nav_item_text">One</span></a></div>
<div class="content_nav_hr"> </div>
<div class="content_nav_item"><a href="#"><img src="images/icon.jpg" height="60px" width="60px" alt="One"><span class="content_nav_item_text">One</span></a></div>
</div>
CSS:
.content_nav{
margin:45px 0px 45px 48px;
padding:0px;
width:232px;
height:467px;
background-color:#82c738;
box-shadow:inset 0px 0px 10px #578e30;
float:left;
}
.content_nav_item {
margin:0px 10px 0px 10px;
padding:0px;
height:115px;
}
.content_nav_hr {
margin:0px 10px 0px 10px;
padding:0px;
height:1px;
width:202px;
background-color:#A0DF5C;
}
.content_nav_item_text {
margin:10px 0px 10px 0px;
padding:0px;
}
.content_nav_item img {
margin:28px 10px 0px 20px;
padding:0px;
display:inline;
}
关于为什么我不能定位那个跨度的任何想法?