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
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3375

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

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
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
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3375

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

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
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: Email Set UP per Portal by jncraig
I think that the answer depends on how email is configured at your host. You'll probably have to co...
RE: skin/container error load by jncraig
I would suggest checking permissions for directories. Does this occur only when you upload a skin...
RE: Add New Profile Properties by jncraig
Hmmm ... I don't have an answer. Does anyone else?
RE: No Access for me too by ristori
it is ok now. Thanks for this action.
skin/container error load by islandman
Has anyone else run across this error when loading skins or containers from site settings?I am using...
Email Set UP per Portal by islandman
How do I set up a unique email address per domain name off 1 hosting environment. for example...m...
RE: localhost Install issues by cdees
Lee: I wanted to follow up on this for anyone following this thread. I have been unable to solve t...
RE: Add New Profile Properties by WSI
HI Joe, The DNN version is 4.5.5. Thanks, Cliff
Change Skin on URL by vinita
Hi,Can the skin be changed based on the url used to access a portal. Multiple portal aliases may be ...
problem creating child portal by kabamaro
  Hello all i have 4 Aliases for my parent portal , lets call them X,y,Z,WIn all Aliases i can creat...
problem creating child portal by kabamaro
  Hello all i have 4 Aliases for my parent portal , lets call them X,y,Z,WIn all Aliases i can creat...
Best DNN portal ever! by derpir
I have been a subscriber since august 2008, and DNNCreative.com is simply the best DNN Portal, their...
RE: skinning trouble by derpir
Hello Yes could you be so kind and take a look att the htm-file and css-file.I would be very gratef...
Search function is not working by kishorpawar
I am using Seach module in my project but not working, i have set   host setting alsoHost --> Schedu...
RE: backend is changing from sql2005 to sql2008 by leesykes
hello,There should not be any code changes needed, but you'll need to make sure that SQL 2008 upgrad...
RE: skinning trouble by leesykes
Hello,I would need to see your code to help you with this one, you can zip up your files and attach ...
RE: Installing DotNetNuke 4.9.00 on VWD 2005 w/ SQL server 2008 by leesykes
I have run a test with SQL Server 2008 express and DotNetNuke installed in exactly the the same way ...
RE: Issue 39 Interview by leesykes
thanks Bill, glad it was useful, we will have a think about the best way to approach this,Thanks,
RE: Issue 39 Authentication by leesykes
yes I have a live site in 4.9.0 at it seems stable as well.
backend is changing from sql2005 to sql2008 by meenu
hi all advance thanks. in my DNN0408 website am using sql2005 as backend.now planning to remove sq...
AppTheory
RSS Feeds