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, ...Vertically Center Menu Using [NAV] skin objectVertically Center Menu Using [NAV] skin object
Previous
 
Next
New Post
5/19/2008 1:31 PM
 

Hello,

I created a set of menu using the [NAV] skin object, however, I am having trouble centered the menu vertically. I attached the code. I also attached the menu to this post. Let me know if I am missing anything.

Thank you,

Lily

 

in .ascx file...
 
<div class="righttab"> 
    <div class="dnnMenuNav"><dnn:NAV runat="server" id="dnnNAV" ProviderName="DNNMenuNavigationProvider" CSSControl="main_dnnmenu_bar" CSSContainerRoot="main_dnnmenu_container" CSSNode="main_dnnmenu_item" CSSNodeRoot="main_dnnmenu_rootitem" CSSIcon="main_dnnmenu_icon" CSSContainerSub="main_dnnmenu_submenu" CSSBreak="main_dnnmenu_break" CSSNodeHover="main_dnnmenu_itemhover" ControlAlignment="Left" ControlOrientation="horizontal" SeparatorLeftHTML="<img alt=&quot;*&quot; BORDER=&quot;0&quot; src=&quot;hcmenutab-left.gif&quot;/>" SeparatorRightHTML="<img alt=&quot;*&quot; BORDER=&quot;0&quot; src=&quot;hcmenutab-right.gif&quot;/>" StyleNodeHeight="18" StyleSelectionForeColor="#000000" IndicateChildren="False" /></div>
</div>

in .css file...


.dnnMenuNav
{
    background-color: Transparent;
    margin: 0px 0px 5px 0px;
    padding: 0px 0px 5px 0px;
}

.main_dnnmenu_container
{
 vertical-align: middle;
 
}

.main_dnnmenu_container a
{
 vertical-align: middle; 
 
}

.main_dnnmenu_bar
{
    list-style:none;
    padding: 0px 0px -5px 0px;
    margin: 8px 0px 0px 0px;
    height: 32px;
    background-image: url(hcmenutab-mid.gif); /*affects submenu td's*/
    background-repeat: repeat-x;
    text-align: center;
}


.main_dnnmenu_item td
{/*TD if menu option for using tables is on*/
 /* background: #c0c0b0;*/
 font-weight: bold;
 font-style: normal;

 display:block;
 float:left;
 font-weight: bold;
 white-space: nowrap;
 background-image:  url(hcmenutab-mid.gif);
 /*background-position: top right;*/
 background-repeat: repeat-x;
 height: 32px;
 /* margin: 0px 0 0 0; */ 
 color: #4d4c4c;

 /*border-right:1px solid #ffffff;
 border-bottom:1px solid #ffffff; effect submenu
 padding-right:10px;*/
 padding: 0px 0px 0px 0px;
 vertical-align: middle;
  
}

 
.main_dnnmenu_rootitem
{
 /*TD if menu option for using table is on */
 height: 32px;

 font-weight: bold;
 font-style: normal;
 display:block;
 float:left;
 background-color: #c0c0b0;
 background-image: url(hcmenutab-mid.gif);
 background-repeat: repeat-x;
 letter-spacing: 0px;
 color: #4d4c4c;
 text-decoration:none;
 border-right: 1px #ffffff solid;
 margin: 0px 0px 2px 0px;
 padding: 0px 0px -5px 0px;
 white-space: nowrap;
}

.main_dnnmenu_itemhover
{ background-color: #c0c0b0; 
 text-decoration: underline;
 color: #ffffff;
 height: 32px;
 padding: 0px 0px 0px 0px;
 font-weight: bold;
 font-style: normal; 
 margin: 0px 0px -2px 0px;
 padding: 0px 0px -5px 0px;
}

.main_dnnmenu_itemhover td
{
 color: #ffffff;
 font-weight: bold;
 font-style: normal;
 /*background-color: #c0c0b0;
 background-image:  url(hcmenutab-mid.gif);*/
 height: 32px;
 /*background-position: top left;*/
 margin:0;
 text-decoration: underline;
 padding:0px 0px -5px 0px;
 margin: 0px 0px -2px 0px;
}


.main_dnnmenu_icon {
                cursor: pointer;
                cursor: hand;
                text-align: center;
                width: 15px;
                height: 100%;
}

.main_dnnmenu_submenu {
                background-color: #c0c0b0; 
                background-image:url(hcmenutab-mid.gif); /*affects submenu td's*/
                height:32px;
    
                white-space: nowrap;
                background-repeat:repeat-x;
                z-index: 1000;
                cursor: pointer;
                cursor: hand;
                padding: 0px 0px -5px 0px;   /*explicitly set padding for sub-menus */
                margin: 0px 0px -2px 0px;
}
.main_dnnmenu_break {
                height: 1px;
                font-size: 1px;
}

.main_dnnmenu_arrow {
 border-right: #cad5ea 1px solid;
 border-bottom: #cad5ea 1px solid;
 border-top: #cad5ea 0px solid;
 font-family: webdings;
 font-size: 10pt;
 cursor: pointer;
 cursor: hand;
}
.main_dnnmenu_rootmenuarrow {
 font-family: webdings;
 font-size: 10pt;
 cursor: pointer;
 cursor: hand;
}

 

 
New Post
6/22/2008 10:57 PM
 

I am interested in the whole DNN:Nav.

I haven't found any good information on how to skin it.  I am going to have to mess around.  I am in need of a good solution.  I am thinking about buying a third party product, but I would like to make what DNN has out of the box work.

Does anyone have any good skinning document help on DNN:Nav? 

~Morty

 
New Post
6/28/2008 11:54 AM
 

dnnNAV renders using span tags (assuming you specificed UseTables="False" ).

The nature of span tag is to display inline, if you wish to vertically align the item, it doesn't help by setting vertical-align to middle. What you can do is to reset the display of the span  element within dnnNAV to display as block. Then you have the ability to (not really vertically align items) set padding to make it vertically aligned with whatever design elements you have.

ie:

.mynav span {display: block;}

Hope this helps!


Cuong Dang
Co-founder: Enliven, dnnGallery
LinkedIn | Twitter
I'm the author of DNN and Web Standards Wrox Blox

 
New Post
10/23/2008 7:13 AM
 

Hi,

I had  the same problem and tried your solution.  Using block made all my nav bar items display vertically so i used inline-block instead. I then tried to use padding from the top to align the text in the middle.  This makes the menu move up a couple pixels in firefox but not ie.  This is a problem as i'm using the menu as tabs at the top of the content.

Simon

 
New Post
10/25/2008 4:48 AM
 

You could our dnnpages skin menu object, the structure is built in UL List,
Please visit www.dnnpages.com for more details.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Vertically Center Menu Using [NAV] skin objectVertically Center Menu Using [NAV] skin object


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