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

Forum

Subject: DNN NAV Menu will not center in IE
Prev Next
You are not authorized to post a reply.

Author Messages
edfran
Nuke Newbie
Nuke Newbie
Posts:5

03 Jun 2008 12:05 PM  
Hello,

I have created a skin using the DNN NAV menu and cannot seem to find the correct class (or the correct set of styles) to get the menu to center in IE. The menu only spreads across the page and it does not seem to matter what I set the margins and alignment at. The menu does center in FireFox but it seems to center twice - the first time it is partially centered and then when I hover over the menu it realigns and recenters correctly.    
I have tried the following classes to no avail: 


.MainMenu_MenuItem td
{font: 1.4em Georgia, "Times New Roman", Times, serif; cellspacing: 0; }

.MainMenu_RootMenuItem
{ align: center; margin-right: auto; margin-left: auto; text-align:center; cellpadding: 0; cellspacing: 0;  }

.MainMenu_RootMenuItem td
{font: 1.4em Georgia, "Times New Roman", Times, serif;  
margin-right: auto; margin-left: auto; text-align:left;  }

.MainMenu_RootMenuItemSel td
{font: 1.4em Georgia, "Times New Roman", Times, serif; 
margin-right: auto; margin-left: auto; text-align:left; }

.MainMenu_SubMenuItemSel td
{font: 1.4em Georgia, "Times New Roman", Times, serif;}

.MainMenu_MenuContainer
{text-align: center; display: inline; margin-right: auto; margin-left:
auto; cellpadding: 0; cellspacing: 0; align: center; }  

Does anyone have an idea what I need to do to get the menu to center in IE? Also, can I adjust it so that the menu does not move when I hover over it (the first time) in Firefox?

Any help would be much appreciated.

Laura

leesykes
Nuke Master II
Nuke Master II
Posts:2993

05 Jun 2008 3:01 AM  
Hello,

I haven't done that much experimentation with the NAV menu, but I am about to tackle it over the next month or so. - The techniques I use for investigating all of the classes used in the styling of any DNN element are outlined here:
Troubleshooting DotNetNuke Skins

You should be able to use those techniques to troubleshoot your menu in FF and work out the best method for centering, hope this gives you a starting point, thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts
edfran
Nuke Newbie
Nuke Newbie
Posts:5

08 Jun 2008 8:42 PM  
Thank you Lee.  I have been working with web developer tool bar for some time now and I see the css classes and styles applied but it just seems that IE is ignoring the "text-align: center" and I do not know why Firefox realigns after I mouse-over (it appears that it thinks that the spacer.gif is larger before the mouse-over.)  If I figure this out I will post the fix, in the meantime, if anyone knows of the fix could you please pass it on?

Thanks again,

Laura

edfran
Nuke Newbie
Nuke Newbie
Posts:5

09 Jun 2008 8:50 PM  
Well, I got the menu to center in IE by adding a width of 50% to the CSSContainerRoot (MainMenu_MenuContainer - see below.)  So, if anyone else has this problem...


.MainMenu_MenuContainer
{ display: inline;
margin-right: auto;
margin-left: auto;
align: center;
text-align: center;
width: 50%;
}

However, the menu centers in Firefox but contains extra spaces to the left and right of each menu link.  When I hover over a link the menu then realigns and gets rid of the extra spaces (I have the hover defined the same as the menu.) It looks like it tries to leave space for an image to the left of the link - is there some way of getting rid of this non-existant image?  I tried the following:

.MainMenu_Separator { width: 0px; height: 0px; padding: 0px; margin: 0px; }
.MainMenu_MenuIcon { cursor: pointer; width: 1px; height: 1px;}
.MainMenu_MenuArrow {width: 0px; height: 0px; border: 0px; }
.MainMenu_RootMenuArrow {width: 0px; height: 0px; border: 0px; }

Any ideas for my Firefox problem?

Laura

edfran
Nuke Newbie
Nuke Newbie
Posts:5

10 Jun 2008 12:17 PM  
I now have this figured out.  Just FYI, when I displayed the menu in block form the menu stopped moving around but it would not center.  When I displayed it in inline-block the menu was centered and did not move around.  I  still needed the work around for IE but now the menu displays as it should in IE and Firefox.  Now to check out Oprah...

Laura

leesykes
Nuke Master II
Nuke Master II
Posts:2993

11 Jun 2008 9:00 AM  
Thanks for adding the info,

Lee

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts
You are not authorized to post a reply.
Forums > Skinning Toolkit > Skinning Toolkit > DNN NAV Menu will not center in IE



ActiveForums 3.7

Latest Forum Posts

RE: Database error by derpir
Yeees!!! thank so much Lee!!! I will continue this by looking at video nr 3 on how to transfer fro...
RE: Database error by leesykes
go to programs / microsoft sql server 2005 / configuration tools / SQL server configuration manager....
RE: Database error by derpir
nailed it!!! but how do I restart with the configuration tool? regards //newbie
RE: Database error by derpir
You put me on the right track there. Turns out that I had server authentication set to 'Windows Au...
RE: Issue 22 - Login failed for user xxxx by leesykes
I just checked and it does have it: Right click on the SQL server node - this is the node with th...
RE: Database error by leesykes
I just checked and it does have it:Right click on the SQL server node - this is the node with the gr...
RE: Database error by derpir
Hello thanks for the tip Lee but I can't find were to change the Authentication mode on my SQL Serv...
RE: Issue 22 - Login failed for user xxxx by derpir
Thanks Joe, You put me on the right track there. Turns out that I had server authentication set ...
RE: Host and Admin user login not working on remote host by leesykes
Can you login as any user? If not it is likely to be a setting in your web.config file.Make sure you...
RE: User Accounts - Profile Property Display settings by leesykes
I would suggest you watch these tutorials:User Accounts new features User Accounts and User Settings...
RE: Database error by leesykes
have a look here
RE: Issue 22 - Login failed for user xxxx by CharlesLegg
Thanks picoallen for the tip. The same error was driving me nuts; such a simple solution. Thanks...
Database error by derpir
HelloI am trying to transfer my website from localhost to my live site. After attaching the DB and c...
RE: page publish date by dnnwebuser
Thanks Its working fine. I have a clarification in Register section that after user registration,us...
RE: User Accounts - Profile Property Display settings by dp6ai
Thanks for clarifying that. Just to confirm I have checked the Visible box on the Manage Profile ...
Host and Admin user login not working on remote host by paulrobinson
Good Evening,I was wondering whether anybody else has had the same issue as I am having now.  I have...
RE: Query regarding clearing cache by mgordon
Correct. It's at "Host Settings" / "Performance Settings" you'll see a link that says "Clear Cache"...
RE: MY FIRST DNN SITE by mgordon
It may just be my network, but I was unable to get to your site. Was there anyone able to get to ...
RE: File Manager Upload (intermittent error) by jncraig
If you are going to upgrade, waitva few more days for 4.9.
RE: User Accounts - Profile Property Display settings by jncraig
There is a check box to make properties visible.
AppTheory
RSS Feeds