Link to home
Start Free TrialLog in
Avatar of rp
rpFlag for Portugal

asked on

Visual Studio Css Menu master page

After some research on the Internet I found this code for css menu. It´s all i need, but i need when select a menu option element selected (for ex. default.aspx) to be in a different color. In this moment only when mouse over the menu, the element is blue.       
What element should add so can add this feature.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Master Language="VB" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
 
<head runat="server">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>HomeProdutosServicosSoftwareInfo</title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
#menu {
	background: #333;
	float: left;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}
#menu li {
	float: left;
	font: 67.5% "Lucida Sans Unicode", "Bitstream Vera Sans", "Trebuchet Unicode MS", "Lucida Grande", Verdana, Helvetica, sans-serif;
	margin: 0;
	padding: 0;
}
#menu a {
	background: #333 url('menu/images/seperator.gif') no-repeat right bottom;
	color: #ccc;
	display: block;
	float: left;
	margin: 0;
	padding: 8px 12px;
	text-decoration: none;
	font-weight:normal;
}
</style>
</head>
 
<body>
 
<form id="form1" runat="server">
 
<table style="width: 100%">
	<tr>
		<td>&nbsp;</td>
		<td>
		   <ul id="menu" style="width: 48%">
		   <li><a href="Default.aspx" target="_self">Home</a></li>
		   <li><a href="Produtos.aspx" target="_self">Produtos</a></li>
		   <li><a href="Servicos.aspx" target="_self">Servicos</a></li>
		   <li><a href="Software.aspx" target="_self">Software</a></li>
		   <li><a href="Informacao.aspx" target="_self">Informacao</a></li>
		   <li><a href="Destaque.aspx" target="_self">Destaque</a></li>
		   <li><a href="Contactos.aspx" target="_self">Contactos</a></li>
           </ul>
		</td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>
		<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
		</asp:ContentPlaceHolder>
		</td>
		<td>&nbsp;</td>
	</tr>
</table>
 
</form>
 
</body>
 
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jkofte
jkofte
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rp

ASKER

With this css code only when click in menu link element the font is red, after browser reload page menu stay gray again and unchanged.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial