Click here to Skip to main content
15,885,998 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

1 solution

Assuming you're using <li></li>] for tab header. Give each <li></li> tag css class .tab-header
CSS
li.tab-header{
    padding: 7px 15px;
    border-right: solid 1px #444;
}

li.tab-header:last-child
{
    border-left: none;
}


-KR
 
Share this answer
 
v2
Comments
BlackCanary 23-Dec-15 15:03pm    
I appreciate your effort in answering my question.
This is how my tabs are generated so I dont know to add css on it like the way you said.

<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" StaticEnableDefaultPopOutImage="false" OnMenuItemClick="Menu1_MenuItemClick">
<items>
<asp:MenuItem Text="Customers" Value="0" Selected="true">
<asp:MenuItem Text="Users" Value="1">
<asp:MenuItem Text="System" Value="2">


<asp:MultiView ID="multiView1" runat="server" ActiveViewIndex="0">
<asp:View ID="Tab1" runat="server">

<asp:View ID="Tab1" runat="server">

<asp:View ID="Tab2" runat="server">

<asp:View ID="Tab3" runat="server">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900