CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/16/2007 3:05:04 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 18 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
sforcier
Asp.Net User
When are styles added to the head for a menu control7/16/2007 3:05:04 PM

0/0

I'm going nuts trying to figure this out. Here's my overall problem... CSS is a bit funny in that the order in which classes appear in the "class" attribute is less important than which class within that attribute appears last on the page. So (psuedo to save space):

<style>

.A{background-color: red;}

.B{background-color: green;}

</style>

<div class="A B" /><div class="B A" />

Will always make green divs, try it for yourself if you don't believe me.

How this ties back to the subject is that the menu control puts it's styles *just above* the </head> tag, so it always looks like:

 <head>

        <!-- All of my static and dynamic stuff -->

        <style>/* Auto genned styles for the menu */</style>

</head>

One of the things in the autogenned code is "background-color: white;" and since that's at the end of the head tag, it always "wins" and I can't bloody override it!

So, my question is how do I override it?

I'm currently trying to write a server control inherited from the Menu Control, and then intercept where the styles are added, but I can't find where they're added!!! I've looked at the output from every render method... nothing. I've looked at this.Page.Header.Controls... nothing. I'm completely flummoxed!

I'd love to know where that code is generated, but I'll settle for any response that gets the job done (e.g. put my styles *after* the auto gen stuff).

Tom Ankers
Asp.Net User
Re: When are styles added to the head for a menu control7/16/2007 4:45:45 PM

0/0

 You could, or have you, tried applying !important to your required CSS class

sforcier
Asp.Net User
Re: When are styles added to the head for a menu control7/16/2007 5:02:24 PM

0/0

I had not used !important before, but that appears to have done the trick. Thanks very much for your help!

For curiosity's sake, I'd still like to know how/where those dynamic styles are rendered if anyone knows.

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning Visual Basic 2005 Authors: Thearon Willis, Bryan Newsome, Pages: 799, Published: 2006
Great Web Typography Authors: Wendy Peck, Pages: 316, Published: 2003
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
ASP.NET Website Programming: Problem - Design - Solution Authors: Marco Bellinaso, Kevin Hoffman, Pages: 576, Published: 2002
Dreamweaver MX 2004: The Missing Manual Authors: David Sawyer McFarland, David Pogue, Pages: 836, Published: 2004
Professional Community Server Authors: Wyatt Preul, Keyvan Nayyeri, Jose Lema, Jim Martin, Pages: 311, Published: 2007
The Complete Asian Cookbook Authors: Charmaine Solomon, Pages: 512, Published: 2006
Adobe Photoshop Elements 5.0 A-Z: Tools and Features Illustrated Ready Reference Authors: Philip Andrews, Pages: 254, Published: 2007

Web:
Styles for menu control - ASP.NET Forums Styles for menu control. Last post 04-11-2007 1:19 PM by Adam. ... to my style sheet and added the styles under the head tag as you said. ...
Menu control does not collapse - ASP.NET Forums Menu control does not collapse. Last post 07-12-2006 12:40 PM by ..... It seems like when you customized the menu styles you added/changed ...
ASP.NET’s Menu control offers another site map navigation option ... Aug 21, 2007 ... NET Menu Control ASP.NET's Menu control offers another site map navigation option ... Oct 18, 2007 ... TechRepublic.com - ASP.NET Menu Control ... The Menu control also provides various options for applying styles to its ...
Menu Note: A Head tag with runat=server must be set on any page that uses any of the Menu HoverStyles and the Menu control will generate all styles in a more ...
ASP.NET Menu Control Now menu can use a style in the section of ASPX page. ... The new version 1.2 includes 67 ready-to-use menu styles, including 8 new styles. ...
Dynamic Drive DHTML Scripts -DD Tab Menu (5 styles) See the new scripts recently added to Dynamic Drive. Click here. ... 1) Script to call in the HEAD section of your page to initialize a Tab Menu instance: ...
MenuItem Class (System.Web.UI.WebControls) For the hover styles of the Menu control to --> ...
Web Site Navigation in ASP.NET 2.0 In the above sample, I have added SiteMapPath control to AsiaNews.aspx and you can see ... You can customize the appearance of menu control through styles, ...
Fredrik Normén's Blog - NSQUARED2 In the Page_Load event of the page I add the MenuItem (Tabs) to the Menu control . The following code will iterate through the number of Views added to the ...




Search This Site:










change relative path problems

sqlsitemapprovider tip ...

text wrapping in submenu item for menu control

treeview in page with existing menu and sitemap

menu or treeview where only children of selected node are expanded

sys.webforms.pagerequestmanagerservererrorexception

themes - changing the display of a control in response to user input

menu staticsubmenu text wrap not aligning propely

multiple sitemap files one site

treeview issue in .net 2.0

how to set acceptbutton to a content page?

listing content place holderers of a masterpage???

asp:content within the head tag of the maintemplate.master throwing error when compiling

subdomain site: master page not working

request.form is not working with the master page (plz.... really urgent)

skin error?

apply css in master page

using javascript calendar in content page

determine if master page is using default content or content contained in an .aspx

treeview with anchor tags

how do you change the path for to a .dll?

dynamic statictopseparatorimageurl?

sitemappath problem

'createresourcebasedliteralcontrol' is not a member of 'asp.homemasterpage_master'.

bread and crumb navigation

how to access next button in createuserwizard

how to apply a masterpage to existing aspx pages?

strange gray line in treeview entries

treeview menu looks wrong once uploaded to internet

dropdown vertical navigation menu ( with animation? )

  Privacy | Contact Us
All Times Are GMT