Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIApplying CSS to the ASP.NET 2.0 menu via the Navigation Provider Applying CSS to the ASP.NET 2.0 menu via the Navigation Provider
Previous
 
Next
New Post
4/6/2006 12:54 PM
 

Hi,

I have followed the steps with mapping asp.net 2.0 menu to the Navigation Provider.
I am now trying to style it.

I have the following definition for the menu in the skin (ascx) file

<dnn:MENU runat="server" id="dnnMENU" PathSystemImage="[APPIMAGEPATH]" PathImage="[HOMEDIRECTORY]" CSSControl="MainMenu_MenuBar" CSSContainerRoot="MainMenu_MenuContainer" CSSNode="MainMenu_MenuItem" CSSIcon="MainMenu_MenuIcon" CSSContainerSub="MainMenu_SubMenu" CSSNodeHover="MainMenu_MenuItemSel" ProviderName="ASP2MenuNavigationProvider"></dnn:MENU>

I am using the out of the box Gray skin at the moment.

I have noticed in the page output that this block of style code is generated

   <style type="text/css">
 .dnn_dnnMENU_ctldnnMENU_0 { background-color:white;visibility:hidden;display:none;position:absolute;left:0px;top:0px; }
 .dnn_dnnMENU_ctldnnMENU_1 { text-decoration:none; }
 .dnn_dnnMENU_ctldnnMENU_2 {  }
 .dnn_dnnMENU_ctldnnMENU_3 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_4 {  }
 .dnn_dnnMENU_ctldnnMENU_5 {  }
 .dnn_dnnMENU_ctldnnMENU_6 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_7 {  }
 .dnn_dnnMENU_ctldnnMENU_8 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_9 {  }
 .dnn_dnnMENU_ctldnnMENU_10 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_11 {  }
 .dnn_dnnMENU_ctldnnMENU_12 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_13 {  }
 .dnn_dnnMENU_ctldnnMENU_14 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_15 {  }
 .dnn_dnnMENU_ctldnnMENU_16 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_17 {  }
 .dnn_dnnMENU_ctldnnMENU_18 { border-style:none; }
 .dnn_dnnMENU_ctldnnMENU_19 {  }
 .dnn_dnnMENU_ctldnnMENU_20 {  }
 .dnn_dnnMENU_ctldnnMENU_21 {  }
 .dnn_dnnMENU_ctldnnMENU_22 {  }
 .dnn_dnnMENU_ctldnnMENU_23 {  }
 .dnn_dnnMENU_ctldnnMENU_24 {  }
 .dnn_dnnMENU_ctldnnMENU_25 {  }
 .dnn_dnnMENU_ctldnnMENU_26 {  }
 .dnn_dnnMENU_ctldnnMENU_27 {  }
 .dnn_dnnMENU_ctldnnMENU_28 {  }
 .dnn_dnnMENU_ctldnnMENU_29 {  }
 .dnn_dnnMENU_ctldnnMENU_30 {  }
 .dnn_dnnMENU_ctldnnMENU_31 {  }
 .dnn_dnnMENU_ctldnnMENU_32 {  }
 .dnn_dnnMENU_ctldnnMENU_33 {  }

</style>

How do I assign values to appear here ?

 
New Post
4/7/2006 9:26 AM
 

These styles controlled by the Menu control and you don't have control over what gets put in them directly.  I believe these styles in particular are controlled by the controls LevelMenuItemStyles and LevelSelectedStyles which are the properties that I use to handle applying different styles to the root and submenus.  You can read a little more on how the provider interacts with this menu in my blog.

The best advice I can give in understanding how this menu works with DNN is to play around with the interface the navigation provider exposes.  The document linked in my blog shows what is handled by each control.


 
New Post
9/13/2006 7:13 PM
 

Hi,

is it somehow possible to make the menu use "separatecss", so that the item styles/ selected item styles don't show up in the page?

Greetings,

Sabine

 
New Post
9/14/2006 9:16 AM
 
The separatecss property is currently specific to solpart.  I suppose one could re-work the aspnet2menu nav provider to use this property to assign the styles differently.  Not sure how you would get your styles associated though, since the class names need to match the ids (I believe).

 
New Post
9/14/2006 2:56 PM
 

Hi,

I use a menu adapter to get  the aspnet2menu to render a list.  In the adapter I assign the ids and classes which I then define in the CSS. So, no need for the inline CSS created by the menu and I really would like to avoid those lines at the beginning of the page.

Any advise on how to implement the separatecss property would be great, as I'm used to C# und VB is still a bit strange for me .

Kind regards

Sabine

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIApplying CSS to the ASP.NET 2.0 menu via the Navigation Provider Applying CSS to the ASP.NET 2.0 menu via the Navigation Provider


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out