我在实现新设计时遇到了问题。虽然锚定元素在旧设计中正确对齐,但出于某种原因,锚定元素在新设计中与底部对齐,并且html/css重新调整UL,LI和A部分是完全相同的。LI内部A元素的垂直对齐
#treeview ul {
padding-top: 3px;
}
#treeview ul li {
background: none repeat scroll 0 0 transparent;
line-height: 24px;
padding-bottom: 3px;
padding-left: 0;
}
#treeview ul li.active {
background: none repeat scroll 0 0 #DDDDDD;
}
#treeview ul li ul li {
padding-left: 30px;
}
#treeview ul li a {
color: #444444;
padding-left: 5px;
text-decoration: none;
}
<div id="treeview">
<ul>
<li>
<img src="assets/js/no-expand.png">
<img class="icon" width="24" height="" src="assets/images/icons/icon_dance24x24.png">
<a title="Essential" href="/index/night-clubs/essential/">Essential</a>
</li>
</ul>
</div>
注意:您可以[格式线为代码(http://meta.stackexchange.com/questions/22186/how-do-i-format-my-code-blocks)通过缩进它们四个空格。编辑器工具栏中的“{}”按钮可以为您做到这一点。 clairesuzy这次为你做了;下次尝试一下。单击编辑器工具栏中的橙色问号以获取更多信息和格式化提示。 – outis 2011-06-02 11:09:05
在右侧的相关列表上可能有10个问题提出非常相似的问题,如果不是相同的问题。 – DanMan 2011-06-02 11:11:13
写显示:块在你的标签 – sandeep 2011-06-02 11:23:59