You need to Register for free and Login to post a message in the forum.

Forum

Subject: Styling the main menu
Prev Next
You are not authorized to post a reply.

Author Messages
Knut Erik
Nuke Active Member
Nuke Active Member
Posts:33

16 Jun 2009 8:10 AM  
Hello, Can someone tell me how to set the height of the main menu bar? I have tried setting it in the .main_dnnmenu_bar class, but nothing happens. I would also like the menu items to be centered vertically in the menu bar. Thanks for any help. Regards, Knut Erik
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


16 Jun 2009 8:28 AM  
You need to set this in the skin, styling the element into which the menu is placed.

Joe Craig
DNN Creative Support
Subscribe to the website
Knut Erik
Nuke Active Member
Nuke Active Member
Posts:33

17 Jun 2009 7:24 AM  
Joe, Thanks for replying. I don't quite understand what you mean by "setting this in the skin". Do you mean the .ascx file? In the .ascx file, I am able to identify the line where I believe the menu is defined, because it lists the various CSS classes which styles the menu. However, setting height="20", for example, after the "align" statement, has no effect. Sorry for asking these stupid questions, but I am new to skinning and this type of programming. Kind regards, Knut Erik
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


17 Jun 2009 11:01 PM  
Sorry. I meant that you need to apply the style to the element that contains the menu.

Joe Craig
DNN Creative Support
Subscribe to the website
Lee Sykes
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5307


23 Jun 2009 10:25 AM  
You need to style this in the skin.css file. You need to identify the id or class that controls the height of your menu and then specify that in the CSS code in the skin.css file.

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
Knut Erik
Nuke Active Member
Nuke Active Member
Posts:33

24 Jun 2009 7:44 AM  
Lee, Thanks for your reply. By using the "Display ID & class details" from the Web developer toolbar in Firefox, it seem like the classes .Skingradient, .main_dnnmenu_bar and .main_dnnmenu_rootitem controls the menu. The first of these classes seemingly controls the area behind the menu. I thought the .main_dnnmenu_bar class should control the menu itself, but nothing happens when I add "width" or "height" statements. The third and last class controls menu font, background color etc, but not height or width. I need to set the height or width of the menu bar because I sometimes get a break in the menu when it stretches out. I would be grateful for any advice. Regards, Knut Erik
Lee Sykes
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5307


30 Jun 2009 2:35 PM  
hello,

it's always a matter of ' playing' with the classes and IDs to find the element to adjust, if you can provide a URL, or attach your skin as a zip file to this forum post, then I can have a quick look, thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
Knut Erik
Nuke Active Member
Nuke Active Member
Posts:33

01 Jul 2009 3:20 AM  
Lee, It would be great if you could take a quick look. The URL is: http://kvina.niva.no/striver/. I would like to set the height of the main menu equal to the flags picture to the left, and the width equal to the logo above (fixed at 900px). It would also be nice to have the menu items centered vertically, but it's not that important. Is it possible to style individual elements by using the full ID instad of the general class name? Thanks again, Knut Erik
Lee Sykes
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5307


01 Jul 2009 5:06 AM  
Hello,

I changed this line of code, removed height and added padding:

.main_dnnmenu_bar {
    cursor: pointer;
    cursor: hand;
padding: 1px 0;
    background-color: #999999; /*Transparent;*/

}

You will see it is slightly larger than the flags, but it maybe easier to increase the size of the flags to match

Yes you can specify individual IDs, use the Web Developers Toolbar, and menu / information / display element information
then with your mouse, navigate through the menu + click on the item you want to view the id of:

ie. this is for the partners menu item

#dnn_dnnNAV_ctldnnNAVt86
{
border: 2px solid red;
}




Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
Knut Erik
Nuke Active Member
Nuke Active Member
Posts:33

01 Jul 2009 7:59 AM  
Lee, Thank you very much for looking at my webpage! This was very helpful. I can use padding to control the width of the menu as well, but the best alternative would be to set it to automatically stretch out to fit with the green/blue login area above, if this is possible. Regarding the individual ID's: When I copy your code for the "Partners" menu item into skins.css and play around with the setting, nothing happens. Do I have to specify individual ID's differently than general classes? Thanks again, Knut Erik
Lee Sykes
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5307


01 Jul 2009 5:02 PM  
Hello,

When testing out these things I would recommend you use the web developers toolbar, we cover how to start toolbar in this tutorial:

I just checked the ID for the partners menu item and the code does work, try this one:

#dnn_dnnNAV_ctldnnNAVt86
{
border: 10px solid red;
}

IDs are specified just as above, if you use the web developer toolbar at I explained in the previous post, it will display the ID that you actually need to use.

For the width, double check your tables, you may be able to specify a width for the table cell holding the menu.

Thanks,




Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
Knut Erik
Nuke Active Member
Nuke Active Member
Posts:33

03 Jul 2009 3:18 AM  
Lee, Your test code for the partners menu item works fine now. I don't know why it didn't work the last time. I use the web developers toolbar in Firefox to test these things. Unfortunately, Firefox sometimes displays the webpage differently than Internet Explorer. I think most users of my site uses IE, therefore I am adapting the skin settings to fit with this browser. Thanks for your help.
Lee Sykes
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5307


03 Jul 2009 12:17 PM  
When you add code to your skin.css file, make sure you press CTRL+F5 to reload the page and reload the CSS code.

If the display is not correct in Firefox I would do some further investigation as that usually means there is something wrong in your code. Usually Firefox displays the code correctly and IE is the one you need to troubleshoot. Also, if it works in Firefox you will find it works in most of the other browsers without problems.

You may want to look at:
Troubleshooting DotNetNuke Skins

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
You are not authorized to post a reply.
Forums > DotNetNuke® > DotNetNuke® Questions > Styling the main menu



ActiveForums 3.7

Latest Forum Posts

Query On Dynamic Form Module by prithviraj
The source element with id dnn$ctr407$DynamicForms$imgMove_48b21a63-ca5a-425d-90ca-599a6e7d51e6 does...
RE: Folder permissions by saintX
Thanks for your answer Rashid! May you please kindly let me know - Which folders - AND for whom...
DNN with Javascript Disabled by aptrivedi
Hi All,I have found my self in bit of trouble.As per my application requriement, i need to handle th...
RE: Change Registration Redirect? by ollep
Well, that sounds good Lee.But I just spent $150.00 and a few days learning the Dynamic Forms  - bec...
RE: Folder permissions by Kazi
Hello FW, The easiest way to set permissions is your control panel, Log in to your CP, click on y...
Folder permissions by saintX
Hello, Can I set the folder permissions on the remote server myself using DW or WVD? If possi...
RE: How to do links? by Guy..L
It's really hard to tell quite how awesome DNN Nav v2 is given the documentation and search results ...
Regarding Editor by prithviraj
Pls let me know whar folders we need to upload when we are changing editors. Suppose i have cute edi...
RE: Change Registration Redirect? by leesykes
It would be best to use Dynamic Registration to avoid 2 registrations.With Dynamic Registration you ...
Indexing DNN pages by Google by Jake Vizner
I have two different DNN web sites. Using Google Webmaster Tools I can see the Google indexed 12 out...
Query Regarding RAD EDitor by prithviraj
Hi, I'm using R.A.D editor in my site. At the time of adding images through the editor I'm unabl...
RE: while installing bulk emailer module in my website by jncraig
Yes, this definitely is a file permissions issue. The default ASP.NET worker task needs to have ful...
RE: Background Music by jncraig
That will work.
RE: Auto create pages and content by dhassall
Hi Joe DNN Out of the box version 4.9 Login as Host with Firefox to create and IE8 to monitor, CTR...
RE: while installing bulk emailer module in my website by dub
Agiline, We have seen this problem before. It is caused by the Security on IIS. Please have a loo...
RE: Change Registration Redirect? by ollep
Probably still want to do it with Dynamic Forms now.My reason for changing (except from getting Aweb...
RE: Change Registration Redirect? by ollep
YES!http://www.dnncreative.com/Subscribe/tabid/81/Default.aspx
RE: Change Registration Redirect? by ollep
Yes I noticed that we where talking about 2 different Modules as soon as I dug into the tutorials.Ab...
RE: Change Registration Redirect? by leesykes
If you are check out the links that I have placed in there:http://www.dnncreative.com/Subscribe/tabi...
RE: Change Registration Redirect? by leesykes
Are you referring to when subscribing there is a link to register and after they register it sends t...
DNN Creative Subscribe
RSS Feeds