如何在水平对齐菜单项的右侧添加边框或线条 [英] How Can I Add A Border Or Line To The Right Of The Menuitem Which Are In Horizontal Alignment
问题描述
我使用了asp:Menu和Asp:multiview来创建标签。
它运作良好,但标签项看起来像一行句子,因为它们是水平对齐的。例如:Tab1Tab2Tab3Tab4
我想修改此标签项看起来像下面的标签
Tab1 | Tab2 | Tab3 | Tab4
我相信我们可以通过css实现这一目标,但我不擅长css以及我在搜索中使用按钮或列表所获得的内容,因此他们可以设置属性。
任何帮助都将不胜感激。
I have used asp:Menu and Asp:multiview to create the tabs .
It worked well but the tab items are look like a single line of sentence since they are horizontally aligned. eg: Tab1Tab2Tab3Tab4
I would like to modify this tab items to look like the following tabs
Tab1|Tab2|Tab3|Tab4
I beliee we can achieve this by css but i am not good at css and what i am getting in search people used buttons or list so they have properties to set it up .
Any help will be appreciated.
推荐答案
假设你正在使用< li>< / li>]
用于标签页眉。给每个< li>< / li>
标记css类.tab-header
Assuming you're using<li></li>]
for tab header. Give each<li></li>
tag css class.tab-header
li.tab-header{
padding: 7px 15px;
border-right: solid 1px #444;
}
li.tab-header:last-child
{
border-left: none;
}
-KR
-KR
这篇关于如何在水平对齐菜单项的右侧添加边框或线条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!