试试这个:
修订:与容器列表项;
#navigation li {
display: table-cell;
vertical-align: bottom;
text-align: left;
padding: 0; /* if you want no spaces at the edges inside the anchor. */
/* ... rest of your properties */
}
#navigation li a {
padding: 0; /* if you want no spaces at the edges inside the list item. */
/* ... rest of your properties */
}
注:的display
属性的值,诸如; “table-cell”,“inline-table”,“table”,“table-caption”,“table-column”,“table-column-group”,“table-row”,“table-row-group”和“继承”在IE7和更早版本中不受支持。 IE8需要!DOCTYPE。 IE9支持这些值。
这里是一个demo on jsFiddle。
您可以通过[告诉SO它是lang-css]来改进您的答案的语法高亮显示 – webaware
感谢您的答复。它正在工作 – buddy
@webaware感谢您的提醒。 –