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, ...Centering the dnnNAV MenuCentering the dnnNAV Menu
Previous
 
Next
New Post
11/10/2010 6:19 PM
 
I've worked on this a couple of days and can't figure out how to center the root level of a standard dnnNav Menu.  I used the Minimal Extropy skin as a template, running in XHTML mode.  I tried setting the "ControlAlignment" property to "Centered" but that doesn't seem to help.

Without setting the menu to unordered list mode, is there a way to do this?

Thanks in advance. 
 
New Post
11/11/2010 1:38 PM
 
If it's a fixed-width design, you may be able to do this:

HTML:
CSS:
#NavID {
   width: 980px;
}
 
.NavMenu {
   margin-right: auto;
   margin-left: auto;
}

Wells Doty Jr
Online Content Development
 
New Post
11/11/2010 1:54 PM
 
Well, can't edit the previous post anymore... so here's the proper final revision:


If it's a fixed-width design, you may be able to do this:

HTML:
<div id="NavID"><dnn:nav csscontrol="NavMenu" controlorientation="Horizontal" indicatechildren="False" providername="DNNMenuNavigationProvider" id="dnnNAV" runat="server"></dnn:nav></div>

CSS:
#NavID {
   width: 980px;
}
 
.NavMenu {
   margin-right: auto;
   margin-left: auto;
}

Wells Doty Jr
Online Content Development
 
New Post
11/11/2010 8:00 PM
 
Got excited, but, sadly, this doesn't work either.

The .NavMenu class you refer to is actually applied to span tage and it seems as though the margin auto trick won't work here.

I've text-aligned and margin auto'd till I'm blue in the face and can't get it to center.

Thanks for the suggestion.

Do you or anyone else have another approach?
 
New Post
11/12/2010 4:54 PM
 
I've been doing the same thing Wells suggested for quite some time now and it works fine for me. I do place a text-align center in the css for the containing/wrapping div, though. But, the margin auto always works fine for me. No other tricks necessary. You may need to post the html from that area and the css you are using. Also, try using Firebug for Firefox to help narrow down culprits that are throwing a wrench in things. This should be super easy to do.

JOHN GIESY
DotNetNuke Hosting Expert

DotNetNuke 7 Hosting $70 /year
DNN4Less.com Team DotNetNuke  

Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Centering the dnnNAV MenuCentering the dnnNAV Menu


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