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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Styling the onhover menu stateStyling the onhover menu state
Previous
 
Next
New Post
8/28/2006 5:26 PM
 

Hi,

Is there a way to style the Main Menu items so that onmouseover the font and the background stay the same and just the color of the text changes. It seems that the submenu items and the hover state for the main menu items are the same and I can not figure out how to separate the two. I dont mind the submenu items exactly as they are on the DNN Blue for instance, but I would like to have control over the hover state of the links in my main menu.

Thanks for any help with this,
TC

 
New Post
8/28/2006 6:28 PM
 

The MainMenu_MenuItem style definition is used for all menu items.
To style the Sub Menu items differently than the Main Menu, cascade the class like this: 

.MainMenu_SubMenu .MainMenu_MenuItem {
background-color: White;
color: Black;
}

 
New Post
8/28/2006 7:13 PM
 

Okay, that makes sense, but please help me by walking me through this.

Here is the site: www.unitychristian.ca/dnn

Here are my styles for the menu section:

/*
===========================
SOLPARTMENU SPECIFIC STYLES
===========================
*/

.MainMenu_MenuContainer {
 background-color: transparent;
}
.MainMenu_MenuBar {
 cursor: pointer;
 height:16px;
 background-color: Transparent;
}
.MainMenu_MenuBreak {
 height: 1px;
}
.MainMenu_MenuItemSel {
 background-color: #8da4d3;
 cursor: pointer;
 color: black;
 font-family: Tahoma, Arial, Helvetica;
 font-size: 9pt;
 font-weight: bold;
 font-style: normal;
 height: 21px;
}
.MainMenu_MenuItem {
 border-left: #cad5ea 0px solid;
 border-bottom: #cad5ea 1px solid;
 border-top: #cad5ea 1px solid;
 border-right: #cad5ea 0px solid;
 cursor: pointer;
 color: #000000;
 font-size: 9pt;
 font-weight: bold;
 font-style: normal;
 background-color: Transparent;
 font-family: Tahoma, Arial, Helvetica;
}
.MainMenu_MenuIcon {
 background-color: #cad5ea;
 border-left: #cad5ea 1px solid;
 border-bottom: #cad5ea 1px solid;
 border-top: #cad5ea 1px solid;
 cursor: pointer;
 text-align: center;
 width: 15px;
 height: 21px;
}
.MainMenu_SubMenu {
 background-color: #cad5ea; 
 z-index: 1000;
 cursor: pointer;
 filter:progid:DXImageTransform.Microsoft.Shadow(color='#696969', Direction=135, Strength=3);
}
.MainMenu_MenuArrow {
 display:none;
}
.MainMenu_RootMenuArrow
{
    display: none;
}

If you look at the page, and mouse over the links you will notice that a blue background happens on mouse over. Also, you will see that I cannot get rid of those little arrow icons beside the active page, despite setting the display:none for both the menuarrow and rootmenuarrow. I want to keep the style for the administrative submenus, but simply have the text for the links turn red.

Another issue: I can't seem to get the separator between the menu items to be transparent, so that the BG is the same as the image I have repeated in the background of the navbar. My code in the XML file is:

  <Token>[SOLPARTMENU]</Token>
  <Settings>
   <Setting>
    <Name>separator</Name>
    <Value><![CDATA[&nbsp;&nbsp;&nbsp;]]></Value>
   </Setting>

Why oh why is there a white space there? Other than these issues, my skin is ready (I think).

TC

 
New Post
8/28/2006 9:22 PM
 

I won't be able to walk you through since you've already begun, but I may be able to help... The forum thread began by asking about controlling the onhover state in the main menu separately from submenus. However, there are other problems that need to be addressed before you style these.

Have you done a "view source" on the page? Here's the generated html for the menu's "Home" link...
<menuitem id="36" title="Home" url="http://www.unitychristian.ca/dnn/Home/tabid/36/Default.aspx" lefthtml="&lt;img alt=&quot;*&quot; BORDER=&quot;0&quot; src=&quot;/dnn/images/breadcrumb.gif&quot;&gt;" css=" " /><menubreak lefthtml="&lt;table summary=&quot;Table for menu separator design&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;   &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" />

1. In the xml file, are you using the separatecss/true setting?
2. If I'm going to use a repeating image as a menu background, I specify the menu container style in the skin.css like so:
.MainMenu_MenuContainer {
 background-color: transparent;
 width: 706px;
 height: 25px;
 line-height: 25px;
 background-image: url(images/menubar.gif);
 background-repeat: repeat-x;
}
3. The menu items grow in height on mouseover because you have MainMenu_MenuBar set to 16px height and MainMenu_MenuItemSel is set to 21px height.
4. The blue background happens on mouseover due to the background-color: #8da4d3 setting of MainMenu_MenuItemSel.
5. To get rid of the arrows, set them "false" in the xml file. userootbreadcrumbarrow and usearrows...
6. There are several methods to make menu item separators, but I'm not sure you need them with a simple menu layout like this.

Hope this helps... nice design, by the way, but I think you need to move the login/register links in off the edge.

 
New Post
8/30/2006 3:05 AM
 

Hi Sam

About the moving the links over - yes, agree completely. In the mock ups, they have some padding on the right. Some of the formatting is still wonky in the skin, though. Will fix that.

Yes, I do specify the seperate CSS to true in the XML file.

No, I had not looked at the outputted source, except in admin mode. Why this did not occur to me... I dont know.

This is great feedback. Short of a walk-through, I was simply hoping to have someone give me a lead that I can follow and you provided that for me. I will post the methods and results of my modifications to the skin files to this thread as soon as they are online so that others can learn from it as well.

BTW: thanks for the compliment on the design

TC

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Styling the onhover menu stateStyling the onhover menu state


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