CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
   Explore    Item Entry    Profile    Invite   History    Resources   SiteMap  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML




Zone: > newsgroup > asp.net forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 11/7/2006 6:51:15 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
Coleen
Asp.Net User
Changing Font/ForeColor on Menus11/7/2006 6:51:15 PM

0/0

I"m sure this question has been asked before, but how do I change the Font color for my menus?  I also want to change the color on the rollover.  I have already changed the background color, and this is what I have for the HTML Code:

<asp:Menu ID="Menu1" runat="server" BackColor="#006699" DataSourceID="SiteMapDataSource1" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="White" StaticSubMenuIndent="10px">

<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#006699" ForeColor="White" />
<DynamicMenuStyle BackColor="#006699" ForeColor="White" />
<DynamicSelectedStyle BackColor="#006699" ForeColor="White"/>
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<StaticHoverStyle BackColor="#006699" ForeColor="White" />
<StaticMenuStyle BackColor="#006699" ForeColor="White" />
<StaticSelectedStyle BackColor="#006699" ForeColor="White" />
<StaticMenuItemStyle BackColor="#006699" ForeColor="White" />
<DataBindings>
<asp:MenuItemBinding DataMember="SiteMapNode" />
</DataBindings>
</asp:Menu>

I thought that changing the ForeColor for each item would change the Font color, but it doesn't.  How do I change the ForeColor/Font color of my menu?  TIA,


Coleen
"Even the smallest foot leaves an impression"
Coleen
Asp.Net User
Re: Changing Font/ForeColor on Menus - what's up with this????11/7/2006 10:16:31 PM

0/0

I can change the BackColor with ease, but the ForeColor/Font color WILL NOT CHANGE!!!  Please, can someone explain why using the above code when I change it to: BackColor="Yellow" ForeColor="Black" the background color of my menu changes just fine, but the Forecolor/Font color stays exactly the same?  Where/what else do I use to change this?  I thought these menus were supposed to be "Highly customizable" What?s up with this????  Any help would be greatly appreciated!  TIA,

 


Coleen
"Even the smallest foot leaves an impression"
iori_jay
Asp.Net User
Re: Changing Font/ForeColor on Menus - what's up with this????11/8/2006 6:12:58 AM

0/0

I can change the forecolor in the way you're trying to do. Not sure what's happening on your side. Can you post a screen shot of the menu after you change the backcolor/forecolor, as well as the code to change to color?
Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
Coleen
Asp.Net User
Re: Changing Font/ForeColor on Menus - what's up with this????11/8/2006 5:24:34 PM

0/0

Here is the code I have (I've remmed out the Static Menu's to see if that would make any difference - it doesn't)  I also changed the background color to yellow just to see if that was working correctly, and it is.  I just don't get why the font/forecolor won't change.  Could it be related to a CSS if the rollover and hover styles are set?  Shouldn't it only pick those up specifically if they are set for the menu?  I'm not quite sure how the CSS works in conjunction with the Menu.  Is there a tutorial somehwere to help me set the colors in my CSS?  Thanks so much for your help!

 <td style="width: 35%">

 

<asp:Menu ID="Menu1" runat="server" BackColor="" DataSourceID="SiteMapDataSource1" DynamicHorizontalOffset="2" ForeColor="black" >

<DynamicMenuStyle BackColor="yellow" ForeColor="black" />

<DynamicHoverStyle BackColor="yellow" ForeColor="Purple" />

<DynamicSelectedStyle BackColor="yellow" ForeColor="black"/>

<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />

<%

-- <StaticHoverStyle BackColor="yellow" ForeColor="black" /> #006699

<StaticMenuStyle BackColor="yellow" ForeColor="black" />

<StaticSelectedStyle BackColor="yellow" ForeColor="black" />

<StaticMenuItemStyle BackColor="yellow" ForeColor="Black" HorizontalPadding="5px" VerticalPadding="2px" />--

%>

<DataBindings>

<asp:MenuItemBinding DataMember="SiteMapNode" />

</DataBindings>

<%

-- <DynamicItemTemplate>

<%# Eval("Text") %>

</DynamicItemTemplate>--

%>

</asp:Menu>

</td>

Here is the screen shot:

Menu Screen shot

 


Coleen
"Even the smallest foot leaves an impression"
Coleen
Asp.Net User
Re: Changing Font/ForeColor on Menus - what's up with this????11/13/2006 5:52:12 PM

0/0

I haven't heard anything back on this - does anyone have any idea why my code doesn't work to change my font/forecolor?  Background color changes just fine (as you can see in the screen shot) but the font/forecolor WON'T change!  Anyone?  TIA!

 


Coleen
"Even the smallest foot leaves an impression"
Coleen
Asp.Net User
Re: Changing Font/ForeColor on Menus - what's up with this????11/13/2006 9:43:00 PM

0/0

I found the problem!  I have a CSS that has set colors for the A:link, A:visited, A:Active and A:hover.  I did not know that these would override the colors I set in the ASP Menu contorl!  Now the issue is that I need those colors for my regular links, but NOT for my menus!  Any suggestions on how to implement color changes to JUST the menu items and NOT the link items in my CSS?  Thanks for any help.

 

 

 


Coleen
"Even the smallest foot leaves an impression"
Coleen
Asp.Net User
Re: Changing Font/ForeColor on Menus - what's up with this????11/14/2006 6:26:44 PM

0/0

Here is the CSS that I used to solve this:

(I also have a:link properties, so if you don't create a separate class for your menus, the a: attributes will override any HTML code you use!)

.menu
{
    background-color:#006699;
    font-family:Arial, Verdana, Helvetica, sans-serif;
    color:white;
    text-decoration: none;
}
.menu a:link
{
    color:White;
    text-decoration: none;
}

.menu a:visited
{
    color:White;
    text-decoration: none;
}

.menu a:hover
{
    color:White;
    font-weight:bold;
    text-decoration: none;
}

.menu a:active
{
    color:White;
    text-decoration: none;
}

And here is the link I put in my HTML:

<asp:Menu ID="Menu1" runat="server" CssClass=menu DataSourceID="SiteMapDataSource1" DynamicHorizontalOffset="2">

I hope this helps someone else to fix menu font/forecolor problems!

 

 


Coleen
"Even the smallest foot leaves an impression"
7 Items, 1 Pages 1 |< << Go >> >|



Search This Site:





Other Resources:
Drive mappings fail - novell.support.bordermanager.vpn - Web ... Drive mappings fail, > ROOT > NEWSGROUP > Novell Forums > novell.support.bordermanager.vpn, ... changing font/forecolor on menus. what is impersonation for ? ...
Notify in caching mode not updating caching mailbox - novell.support ... Notify in caching mode not updating caching mailbox, > ROOT > NEWSGROUP > Novell Forums > novell.support.groupwise. ... changing font/forecolor on menus ...
CodeProject: WinForm Style Sheet. Free source code and programming help Now, you have an inherited Label, its properties (Font and ForeColor) have been preset. ... In addition to changing the properties of the ErrorLabel, you can ...
CodeProject: Changing the background color of cells in a DataGrid. Free ... Menus. Miscellaneous. Printing. Progress Controls. Selection Controls ... be looking for is "Customization 4: Changing Cell BackColor, ForeColor and Font" ...
Dfl / ChangeLog | Dprogramming.com Wiki - The D programming language There has been significant changes to menus and object collections in this release. ... Controls can inherit backColor, foreColor, leftToRight, font and cursor. ...
CHAPTER 3 Each of these controls has properties such as Name, Text, Font, Forecolor, ... For each radio button, we click on it and insert color-changing code. ...
Controls & Forms \ Visual Basic Products - Developer Fusion - Visual ... Popup menus and on-the-fly icon changing fully supported. WTabs Control ... You can specify Font, ForeColor, HoverColour, HoverUnderline and more. Scrolling ...
problem changing the forecolour Forecolor is the font color. There may be an exception or two in which it ... can do through the Access built in menus, you can also. do with DoCmd. ...
FVWM - Man page - FvwmScript ... MinValue int Font string ForeColor { color } BackColor { color } HilightColor ... All menus are displayed at the top of window. ...
Visual Basic Unicode Controls for Programmers and Developers. Controls ... ... Property on the fly and the bar menus will update ... Changing item ForeColor/BackColor at runtime was not updating the control. Done. 08-Mar-2007 ...
 
All Times Are GMT