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

Forum

Styling the main menu
Last Post 2009-07-03 06:17 PM by Lee Sykes. 12 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Knut ErikUser is Offline
Nuke Active Member
Nuke Active Member
Posts:32

--
2009-06-16 02:10 PM  
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 CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9001
Avatar

--
2009-06-16 02:28 PM  
You need to set this in the skin, styling the element into which the menu is placed.

Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
Knut ErikUser is Offline
Nuke Active Member
Nuke Active Member
Posts:32

--
2009-06-17 01:24 PM  
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 CraigUser is Offline
DNN Creative Support
Nuke Master VI
Nuke Master VI
Posts:9001
Avatar

--
2009-06-18 05:01 AM  
Sorry. I meant that you need to apply the style to the element that contains the menu.

Joe Craig, DNN Creative Support

Subscribe to DNNCreative
I recommend PowerDNN for DotNetNuke Hosting.
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2009-06-23 04:25 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
Knut ErikUser is Offline
Nuke Active Member
Nuke Active Member
Posts:32

--
2009-06-24 01:44 PM  
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 SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2009-06-30 08: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/DNNCreative

Lee Sykes's Facebook Profile
Knut ErikUser is Offline
Nuke Active Member
Nuke Active Member
Posts:32

--
2009-07-01 09: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 SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2009-07-01 11: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/DNNCreative

Lee Sykes's Facebook Profile
Knut ErikUser is Offline
Nuke Active Member
Nuke Active Member
Posts:32

--
2009-07-01 01:59 PM  
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 SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2009-07-01 11: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/DNNCreative

Lee Sykes's Facebook Profile
Knut ErikUser is Offline
Nuke Active Member
Nuke Active Member
Posts:32

--
2009-07-03 09: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 SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2009-07-03 06: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/DNNCreative

Lee Sykes's Facebook Profile
You are not authorized to post a reply.

Active Forums 4.3

Latest Forum Posts

Admin menu problem by alireza arabiyan
hi i installed dnn 6 on localhost and move it in my host, all link's , pages and modules are ok,
Re: SQL SERVER 2008 R2 Remote connection by Prakasam Srinivasan
I have successfully configured MSSQL Server 2008 r2 remote connection. I am using windows 7 and it h
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config procedure
RE: dnn 4.4 upgrade issue by imran shaikh
Thanks you all it is done by renaming release.config to web.config
dnn 4.4 upgrade issue by imran shaikh
hi this is imran i am upgrading dnn 4.4 to dnn 6.0.2 and getting this error please help me for this
RE: How to build Skins for DNN 6.x by Joseph Craig
I'd recommend that you try replacing the hard-coded text with the DotNetNuke Text skin object. That
RE: Module permission does not work! by Joseph Craig
What permissions have you give to that role?
RE: DNN nav issue by Joseph Craig
Are you using a custom skin? How often does this happen?
RE: Friendly URLs Broken by Joseph Craig
I don't entirely understand this, but I'm glad you got things working.
RE: How to build Skins for DNN 6.x by Christopher Adamakis
Dear all, I have one more question regarding greek fonts. If you check my site http://www.expertsoft
RE: Dnn local setup problem by imran shaikh
this is error is resolve now now getting this one Server Error in '/cooperpharma.ma' Applicat
RE: Module permission does not work! by Abraham Tameru
I created a special role for the user to administer the site. The user is not a member of the Admini
Dnn local setup problem by imran shaikh
Hi All i have just installed the new site files on my local computer set the connection strin
RE: Firefox has detected that the server is redirecting the request for this address in a way that will never complete. by imran shaikh
Hi i have the same issue Firefox has detected that the server is redirecting the request for thi
DNN nav issue by imran shaikh
Hi All This is imran i am using DNN 6.0 in which issue is that while i am refreshing the site nav
RE: Problem After Attaching/Detaching Database.mdf by Prakasam Srinivasan
thanks joe! But I have connect with database.mdf file in App_Data. I detach the database from
RE: Ventrian News Article by Collin Stefani
Posted By Joseph Craig on 2012-01-18 10:51 AM I'm not sure that you can with the built-in UI.
RE: Friendly URLs Broken by Vistalogix Corporation
Well, we figured out that the problem is related to .Net framework 3.5. Friendly URLs works fine und
RE: Problem After Attaching/Detaching Database.mdf by Joseph Craig
That behavior of running the installation wizard indicates a problem connecting to the database.
RE: Friendly URLs Broken by Vistalogix Corporation
Nope, just a straight-up DNN install and configured in Host -> Friendly URLs as described in my orig
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds