472,119 Members | 1,509 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Working with <asp:menu...


Hello,
Does someone know a link to an example of customization of an asp:menu?

Many thansk in advance.
S
May 3 '07 #1
13 3277
"Smith" <Sm***@pricateemail.comwrote in message
news:Og**************@TK2MSFTNGP05.phx.gbl...
Does someone know a link to an example of customization of an asp:menu?

1) Launch your Internet browser (e.g. IE, FireFox, Opera, Netscape etc)

2) Navigate to http://www.google.com

3) Enter the following text in the box:

<asp:Menu

4) Hit the button
--
http://www.markrae.net

May 3 '07 #2
Here is a more specific question. I searched google and did not fidn a way
to do this.
I have the folowing in the stylesheat of the theme i use for my application:
a:LINK { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
12px; color: #003399}

a:ACTIVE {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:HOVER {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:VISITED {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #666666;

}

But i do not want this to applly to my <asp:menu control in the master
page.

I tried to set the different properties in the menu definition e.g.

DynamicHoverStyle-ForeColor="white"

but the above has not effect. Can someone tell me how to achive this?

Thanks

S
May 3 '07 #3
"Smith" <Sm***@pricateemail.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
But i do not want this to applly to my <asp:menu control in the master
page.

I tried to set the different properties in the menu definition e.g.

DynamicHoverStyle-ForeColor="white"

but the above has not effect. Can someone tell me how to achive this?
I do that by using separate styles...

1) Create a separate style just for the menu:

..MenuHoverStyle
{
color:white;
}

2) Reference it

<asp:Menu ID="mnuMenu" runat="server"
StaticHoverStyle-CssClass="MenuHoverStyle"
DynamicHoverStyle-CssClass="MenuHoverStyle">
--
http://www.markrae.net

May 3 '07 #4
1) Create a separate style just for the menu:
>
.MenuHoverStyle
{
color:white;
}

2) Reference it

<asp:Menu ID="mnuMenu" runat="server"
StaticHoverStyle-CssClass="MenuHoverStyle"
DynamicHoverStyle-CssClass="MenuHoverStyle">
--
http://www.markrae.net
Great,
That sounds brillant.

I will give it a try
Thanks
S
May 3 '07 #5

I use the following
..MenuHoverStyle

{

color:white;

background-color:Black;
}

I was expeting the menu text to be black. It doesnt. What is wrong with my
style?

StaticHoverStyle-CssClass="MenuHoverStyle"


May 3 '07 #6
Sorry, the menu text to be white and not black.
May 3 '07 #7
"Smith" <Sm***@pricateemail.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
I use the following
.MenuHoverStyle

{

color:white;

background-color:Black;
}

I was expeting the menu text to be white. It doesnt. What is wrong with my
style?
Hmm - nothing as far as I can see... What colour is it, AAMOI...?
StaticHoverStyle-CssClass="MenuHoverStyle"
Do you not have any dropdown menus...? If you do, you need to set the
DynamicHoverStyle-CssClass property too...

--
http://www.markrae.net

May 3 '07 #8
Do you not have any dropdown menus...? If you do, you need to set the
DynamicHoverStyle-CssClass property too...

--
http://www.markrae.net
The menu color folow the a:Link definiton of tyhe stylesheet ...
a:LINK { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
12px; color: #003399}

a:ACTIVE {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:HOVER {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:VISITED {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #666666;

}

It does work when i remove these styel from myn .css file.

What can i do to have both?


May 3 '07 #9
"Smith" <Sm***@pricateemail.comwrote in message
news:uj*************@TK2MSFTNGP04.phx.gbl...
It does work when i remove these styel from myn .css file.
That's interesting...
What can i do to have both?
I'm afraid I don't know...

If it helps, this works for me:
body
{
background-color:white;
font-family:Verdana, Arial, Sans-Serif;
font-size:9px;
font-weight:normal;
text-decoration:none;
overflow:auto;
margin-left:0px;
margin-right:0px;
margin-top:0px;
margin-bottom:0px;
}
..button
{
background-color:#0099FF;
border-color:white;
border-style:ridge;
border-width:1px;
color:white;
}
td
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
submit
{
background-color:#0099FF;
border-color:White;
border-style:ridge;
border-width:1px;
color:White;
}
input
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
select
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
textarea
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
ul
{
margin-top:0px;
margin-bottom:0px;
}
div
{
font-family:verdana;
}
a
{
color:black;
}
a:visited
{
color:black;
}
a:hover
{
color:red;
}
..staticMenuItemStyle
{
width:60px;
height:20px;
background-color:#dcdcdc;
color:black;
display:block;
}
..dynamicMenuItemStyle
{
width:120px;
height:20px;
background-color:#dcdcdc;
color:black;
display:block;
}
..MenuHoverStyle
{
background-color:#b0c4de;
}

<asp:Menu ID="mnuMenu" runat="server" Orientation="Horizontal"
StaticMenuItemStyle-CssClass="staticMenuItemStyle"
StaticHoverStyle-CssClass="MenuHoverStyle" StaticPopOutImageUrl=""
StaticEnableDefaultPopOutImage="false"
DynamicMenuItemStyle-CssClass="dynamicMenuItemStyle"
DynamicHoverStyle-CssClass="MenuHoverStyle" DynamicPopOutImageUrl=""
DynamicEnableDefaultPopOutImage="false">
<Items>
...
</Items>
</asp:Menu>
--
http://www.markrae.net

May 3 '07 #10
Hi Mark,
That does indeed make some difference.
I will continue my work on that basis.

many thanks for your help.
S
May 3 '07 #11
"Smith" <Sm***@pricateemail.comwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
That does indeed make some difference.
I will continue my work on that basis.
Now I'm curious!

I'm glad that my markup worked for you, but I'd be really interested to know
why... :-)
--
http://www.markrae.net

May 3 '07 #12
Now I'm curious!
>
I'm glad that my markup worked for you, but I'd be really interested to
know why... :-)
--
http://www.markrae.net
Well,
I just removed my html tag styles and build on top of your markup adding
what i needed the appropriate places ;)
Does tha make sense?

May 3 '07 #13
"Smith" <Sm***@pricateemail.comwrote in message
news:eY**************@TK2MSFTNGP02.phx.gbl...
I just removed my html tag styles and build on top of your markup adding
what i needed the appropriate places ;)
Does tha make sense?
Not really... :-)

I'm not sure what you were doing differently to stop it working...???
--
http://www.markrae.net

May 3 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by mensuur | last post: by
2 posts views Thread by Mark Rae | last post: by
reply views Thread by chris.mcinnes | last post: by
2 posts views Thread by jason | last post: by
2 posts views Thread by Kevin L. Kitchens | last post: by
reply views Thread by Piotr Strycharz | last post: by
3 posts views Thread by win | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.