#nav
{
font-family: arial, sans-serif;
position: relative;
width: 900px;
height: 30px;
font-size: 13px;
color: #ffffff;
float: left;
top: 0px;
left: 0px;
margin-left: 20px;
}
#nav ul
{
list-style-type: none;
height: 30px;
}
#nav ul li
{
float: left;
position: relative;
}
#nav ul li a
{
text-align: center;
display: block;
text-decoration: none;
color: #ffffff;
line-height: 30px;
padding: 0px 10px 0px 10px;
}
#nav ul li a:hover, #nav ul li a:focus
{
color: #333;
background: #fff;
}
#nav ul li ul
{
display: none;
}
#nav ul li:hover ul, #nav ul li:focus ul
{
display: block;
position: absolute;
}
#nav ul li:hover ul li, #nav ul li:focus ul li
{
}
#nav ul li:hover ul li a, #nav ul li:focus ul li a
{
display: block;
color: #ffffff;
text-align: left;
background: #333;
width: 130px;
}
#nav ul li:hover ul li a:hover, #nav ul li:focus ul li a:focus
{
background: #111;
color: #fff;
}
botaxsmaniz
Member
85 Points
88 Posts
menu css for asp.net with vb.net
May 10, 2012 11:43 PM|LINK
is there any example of how to make css menu in asp.net? I am using vb.net to creation asp.net
best regards,
martin
mohammed.kam...
Member
139 Points
92 Posts
Re: menu css for asp.net with vb.net
May 11, 2012 12:13 AM|LINK
<div id="nav"> <ul> <li> <asp:HyperLink runat="server" NavigateUrl="~/admin/">Home</asp:HyperLink> </li> <li> <asp:HyperLink runat="server" href="#">Orders</asp:HyperLink> <ul> <li> <asp:HyperLink runat="server" NavigateUrl="~/admin/orders.aspx">Add Order</asp:HyperLink> <asp:HyperLink runat="server" NavigateUrl="~/admin/listOrders.aspx">List Order</asp:HyperLink> </li> </ul> </li> </ul> </div>NOW THE CSS
#nav { font-family: arial, sans-serif; position: relative; width: 900px; height: 30px; font-size: 13px; color: #ffffff; float: left; top: 0px; left: 0px; margin-left: 20px; } #nav ul { list-style-type: none; height: 30px; } #nav ul li { float: left; position: relative; } #nav ul li a { text-align: center; display: block; text-decoration: none; color: #ffffff; line-height: 30px; padding: 0px 10px 0px 10px; } #nav ul li a:hover, #nav ul li a:focus { color: #333; background: #fff; } #nav ul li ul { display: none; } #nav ul li:hover ul, #nav ul li:focus ul { display: block; position: absolute; } #nav ul li:hover ul li, #nav ul li:focus ul li { } #nav ul li:hover ul li a, #nav ul li:focus ul li a { display: block; color: #ffffff; text-align: left; background: #333; width: 130px; } #nav ul li:hover ul li a:hover, #nav ul li:focus ul li a:focus { background: #111; color: #fff; }hope tat helps
OWDARO
Jo em
Member
30 Points
17 Posts
Re: menu css for asp.net with vb.net
May 11, 2012 12:14 AM|LINK
Hope this links will help you
http://msdn.microsoft.com/en-us/library/ms366731.aspx
http://www.asp.net/cssadapters/Menu.aspx
botaxsmaniz
Member
85 Points
88 Posts
Re: menu css for asp.net with vb.net
May 11, 2012 01:41 AM|LINK
hi mohammed,
where i save this css file? do u have tutorial for me? thank very much
best regards,
martin
botaxsmaniz
Member
85 Points
88 Posts
Re: menu css for asp.net with vb.net
May 11, 2012 01:52 AM|LINK
Hi Jo em,
i can't using this css : http://www.asp.net/cssadapters/Menu.aspx, because can't install aplication in server.
thanks for your help
martin
mohammed.kam...
Member
139 Points
92 Posts
Re: menu css for asp.net with vb.net
May 11, 2012 02:48 AM|LINK
create a file called Style.css
save the css code in tat file.
now in the html file link the css file like this
in the head section
<head>
<link rel="Stylesheet" type="text/css" href="Style.css"></link>
</head>
<body>
the menu code goes here
<body>
OWDARO