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, ...How Do I Change Background Color of Last 3 Root Menu TabsHow Do I Change Background Color of Last 3 Root Menu Tabs
Previous
 
Next
New Post
3/3/2011 11:14 AM
 
I have an interesting challenge...
With the current DNN menu, is there a way for me to change the css color or background color and font of the last 2 or 3 root menu items?

In other words, if i have a DNN menu with 7 top menu items and I want the last 3 of those top root items namely Menu Tabs 5,6 and 7 to have a different css font or menu background color, HOW would i accomplish that in the CSS using the current DNN Menu Module?

My first attempt failed when i used firebug to grab the CSS for that Menu Tab at that position... it gave me a root menu class number of "mi mi5 id78 root" so i created a style in my skin css of :

.mi mi5 id78 root {
    background-color: #F00;
    font-size:18px;
}

However this FAILED... nothing happened.

Is it perhaps possible to create some kind of conditional statement in the skin where if the root menu tab id is greater than a certain number, then reset or over ride the background color for that Top Tab Item?

So i ask the DNN Skin Scientists of this forum, How would you recommend i produce a CSS where the last 3 Tab Items have a background color or different font using the current DNN menu?

Please Advise...
Thanks
 
New Post
3/4/2011 12:35 AM
 
well... i'll share with the forum what i've found so far... and perhaps someone could share some thoughts and ideas of how to make this work further

Here is what works: Using Firebug i was able to grab DNN's menu id for 5th top level Root Node which was
<span id="dnn_dnnNAV_ctldnnNAVctr78" class=" mi mi5 id78 root">

So what i did was create a style as follows
#dnn_dnnNAV_ctldnnNAVctr78 {
     background-color: #F00;
}
AND THE ABOVE WORKED!!!!! but wait... hold the excitement..

Next i needed the mouse over or the a:hover to work so i did the following
#dnn_dnnNAV_ctldnnNAVctr78 a:hover{
    background-color:#0F0;
}
AND THE LINK HOVER FAILED!!!...

So i was able to set the background color specifically for Root DNN menu item number 5 but the link hover style failed... not sure what i try next to get the LINK HOVER to work...

I'm getting close to a solution but If anyone has any ideas.. please suggest them.
 
New Post
3/4/2011 1:23 AM
 
Well... i found what LINK HOVER works... and i'm just sharing this with the rest of the forum So if you ever need certain dnn root menu items to be different colors or blocks.... here is what you do.

Use Firebug to retrieve the DNN CSS code which in my case was the following: This was what Root Menu Item number 5 revealed to me. The next step is to create a style.(NOTE: i ignored the class=" mi mi5 id78 root") Take the span id of dnn_dnnNAV_ctldnnNAVctr78 or whatever number is returned in your case. And create the css as follows:

 #dnn_dnnNAV_ctldnnNAVctr78 { background-color: #F00;
/* Corrects Menu Padding in IE */
 padding-top: 4px;
padding-bottom: 4px; }

#dnn_dnnNAV_ctldnnNAVctr78.hov{ background-color:#000066; color: #fff; text-decoration:none; }

AND THATS IT!... You have your Background Color and Hover CSS for specific Root Menu items... the next trick would be to make this work for the fly out menu drop downs... This may have seemed elementary to others but i was glad to figure this out and share with the community. by the way... "LONG LIVE FIREBUG!"
 
New Post
6/6/2014 1:53 AM
 
I think it's a dangerous practise to style elements based on the generated id.

I think the first idea - that class='mi mi5 id78 root' would be targeted by

.mi mi5 id78 root {
background-color: #F00;
font-size:18px;
}

is wrong. This looks to be based on an idea that class='mi mi5 id78 root' specifies ONE class name containing spaces. It does not. It specifies that the element has all four named classes.

I've never tried it, but I think the CSS selector should be

.mi.mi5.id78.root {
background-color: #F00;
font-size:18px;
}

I believe that specifies elements having class mi AND class mi5 AND ...

Leave the spaces out because...

.mi .mi5 .id78 .root {
background-color: #F00;
font-size:18px;
}

I believe specifies elements having class root WITHIN an element having class id78 WITHIN ...

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
6/6/2014 10:52 AM
 
You should have a look at this :
http://www.dnnsoftware.com/community-...
completed with
http://www.dnnsoftware.com/community-...
HTH regards

Julien Girerd
DevPCI - DotNetNuke Experts France Communauté des utilisateurs francophone de DotNetNuke DNN-Connect
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...How Do I Change Background Color of Last 3 Root Menu TabsHow Do I Change Background Color of Last 3 Root Menu Tabs


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