in the menu's div when the click the one menu it will chage their color when i click the other btn

Posted by smahesh588-19784 under CSS 3 on 12/15/2012 | Points: 10 | Views : 1041 | Status : [Member] | Replies : 3
in the menu's div when the click the one menu it will change their color when i click the other btn means the old one menu disaplay different color rest of menu are disaplay same
how to write code this one

thanks in advance




Responses

Posted by: Somu475 on: 12/16/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Mahesh,

You can use css properties to set the different colors for your menu bar separately (Hover, Selected, Active etc)
Go through the following codes.

Master page-->>
<td class="menu " style="border:none;">

<div class="menu ">
<asp:Panel ID="__masterPnlMenu" runat="server">
<asp:Menu ID="__masterMenubar" runat="server" DataSourceID="SdsMenu"
EnableViewState="false" Orientation="Horizontal" CssClass="menubar" />
<asp:SiteMapDataSource ID="SdsMenu" runat="server" ShowStartingNode="false"/>
</asp:Panel>
</div>
</td>

CSS file-->>

td.menu
{
background-color:#39495B;
}

div.menu ul li a:hover
{
background-color: #B7D5F2;
color: #465c71;
}

div.menu ul li a:active
{
background-color: #665c71;
color: #cfdbe6;
}

div.menu ul li a:selected
{
font-size:11pt;
background-color: #A7D5F2;
color: #4a5c71;
}

Use whatever the color you need in css file.

Mark as answer if it helps you..

-Somu

smahesh588-19784, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 12/16/2012 [Member] Starter | Points: 25

Up
0
Down
if you are using asp.net menu you can use the following thing.

<StaticSelectedStyle />

<StaticHoverStyle />


You can define CSS for each of the above.

____________
www.flickr.com/photos/psdesigner/

smahesh588-19784, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 12/16/2012 [Member] Starter | Points: 25

Up
0
Down
a:link {color:#FF0000;} /* unvisited link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;} /* mouse over link */
a:active {color:#0000FF;} /* selected link */

This can also be helpful.

If not please let me know, i have a jquery method too.

____________
www.flickr.com/photos/psdesigner/

smahesh588-19784, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response