473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Menu Controls and CSS

Is there a way to make a Menu control ignore the styles set by a
stylesheet?

The reason I ask is that I have built an ASP.Net site with content
pages that use a master page which uses a CSS for formatting. The
problem with this is that I have a menu on the master page that I want
to behave differently than the links on the content pages, but the CSS
formatting applies itself to the page links AND the menu links
regardless of what I try. I want the text in the menu to change color
when the mouse hovers over it from black to white, but the links in the
page to change from red to black. I can make the menu behave correctly,
but then the page links don't behave like I want because I have to make
the links inherit the text color so the menu's settings will show. I
can make the page links do what I want, but then the menu's color is
wrong. I have even tried making a theme for the content page, but that
affected the entire page, not just the content part. Of course seeing
as the page is processed by the server before being presented, that
makes sense. So now I'd like to know if I can make the control ignore
the CSS formatting altogether and only use the settings I want to give
it, or even a seperate stylesheet.

The menu uses a sitemap for it's linking info, if that matters.

If this is the wrong place to ask such a question, please accept my
apologies and point me to the correct place for my inquiry.

Thank you!

May 25 '06 #1
3 1371
Have you tried adding a skin for the menu?
--
-Demetri
"Bryan" wrote:
Is there a way to make a Menu control ignore the styles set by a
stylesheet?

The reason I ask is that I have built an ASP.Net site with content
pages that use a master page which uses a CSS for formatting. The
problem with this is that I have a menu on the master page that I want
to behave differently than the links on the content pages, but the CSS
formatting applies itself to the page links AND the menu links
regardless of what I try. I want the text in the menu to change color
when the mouse hovers over it from black to white, but the links in the
page to change from red to black. I can make the menu behave correctly,
but then the page links don't behave like I want because I have to make
the links inherit the text color so the menu's settings will show. I
can make the page links do what I want, but then the menu's color is
wrong. I have even tried making a theme for the content page, but that
affected the entire page, not just the content part. Of course seeing
as the page is processed by the server before being presented, that
makes sense. So now I'd like to know if I can make the control ignore
the CSS formatting altogether and only use the settings I want to give
it, or even a seperate stylesheet.

The menu uses a sitemap for it's linking info, if that matters.

If this is the wrong place to ask such a question, please accept my
apologies and point me to the correct place for my inquiry.

Thank you!

May 25 '06 #2
I'll have to give that a try as soon as I learn how to make and apply a
skin for the menu...

May 25 '06 #3
It's fixed!

All I had to do was assign a class to the links on the content pages
and modify the stylesheet appropriately. This way if I need one page's
links or even a few to look different later, I can just change their
class and make an entry in the stylesheet.

May 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dacian | last post by:
Hi, I´m trying to place a javascript navigation menu inside a cell of a table in my page, the problem is that the constructor of the menu object has parameters for menu positioning and size and...
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
4
by: jesse.hartwick | last post by:
Hey group! I have a toolbar with a "DEVELOPER" menu. I have it so that it when the menu title is clicked, a pop-up form will appear if the user has not yet verified that he or she has developer...
2
by: Jacques | last post by:
Hello, I am creating a menu for an Office Add-in. The menu displays OK. But, each time I run the Office App (Word) it adds another menu item. The Word menu bar looks like: File | Edit |...
4
by: paula | last post by:
I've got a problem with asp.net i am trying to make a menu control. and have searched the web for serveral controls but they don't work correctly. I am pretty new to asp.net building. What am i...
1
by: stinehelferw | last post by:
I need a right-click menu on a form list control with combobox controls. I used View->Toolbars->Customize to create a toolbar. I added ComboBox through commands tab. I set properties to Popup...
17
by: GS | last post by:
the main menu in the application seemed to disappeared all together until I click on an control and select mainmenu1 in designer. then the mainmenu1 displays where it should be but running it or...
3
by: John | last post by:
Hi there, I was reading an article (http://avenuea-razorfish.com/articles/TheAll-MenuNavigation_Turbek.pdf) on 'all-menu navigation' and I'd like to try and implement this in my site. Can...
0
by: Academia | last post by:
Here's the scenario: A form contains two user controls. Each user control has its own context menu and the form has a main menu. I use the older menu controls and each user control has a...
2
by: fjohnson | last post by:
Hello, I have a CSS Horizontal dropdown menu and the drop down menu is pushed to the right instead of directly underneath the heading. I am completely new to CSS and I do not yet know exactly what...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.