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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIRenderMode UnordereList and inline stylesRenderMode UnordereList and inline styles
Previous
 
Next
New Post
4/17/2009 8:08 PM
 

I am finally getting around to using the NAV menu with RenderMode UnorderedList. The obvious benefit is the real links to pages rather than postbacks. While it is working just as advertised, I have to say, skinning turns out to be a bit of a challenge. While not impossible, it's a lot more difficult than it should be. Maybe I'm doing something wrong and there is a simple solution (other than using RenderMode Normal - I really want the links).

The problem is that the li tags have a LOT of inline styles. For all I care, there really shouldn't be any whatsoever. For example here is an li tag for a submenu:

<ul>
    <li id="dnn_dnnNAV_ctldnnNAVctr45" class=" mi mi6-4 id45"
           style="padding-bottom: 0px; list-style-type: none;
           margin: 0px; padding-left: 0px; padding-right: 0px;
           list-style-image: none; padding-top: 0px">
        <a href="http://www.mydnnsite.com/Admin/UserAccounts/tabid/45/Default.aspx">
          <img alt=" " style="border-right-width: 0px;
                border-top-width: 0px; border-bottom-width: 0px;
                border-left-width: 0px"
                src="http://www.mydnnsite.com/images//icon_users_16px.gif" />
          <span>User Accounts</span>
        </a>
     </li>
</ul>

(Isn't that "a" link just great for SEO?).  I'm not sure why it bothers to put all those inline styles out there. Especially, the padding and margin styles really make it hard to assign actually useful padding or margin value. Yes, of course I can go a level deeper and assign it to the "li a" tags, which is what I'm doing now, but that really defeats the whole purpose of the great new css styling the NAV menu now offers.

Well, I'm hoping I'm doing something wrong, but so far, it looks like this is the way it works. Again, not impossible to work with, but a bit harder than I was hoping it would be. Other than that, love the new css menu features and Jon Henning's excellent webcast about it at http://www.codeendeavors.com/Downloads.aspx

 
New Post
4/19/2009 8:33 AM
 

Never mind this. I must have had a bad day. Things work exactly the way they should. There are no inline styles. I have switched to Normal and back to UnorderedList (among many other changes). I don't know why I saw these inline styles, but they are not there (any more?). So, hoping for the best and back to making it look great.

I found the culprit but haven't just figured it all out yet. dnn.controls.dnnmenu.js dynamically changes the styles (hence the inline styles) and does this somewhere around line 238:

{if(this.menu.isNodeVertical(this.mNode)==false)
ctl.style.display='inline';ctl.style.listStyle='none';ctl.style.margin=0;ctl.style.padding=0;}}

Of course, this totally negates my css styling.

 

 
New Post
4/21/2009 8:30 AM
 
 
New Post
5/1/2009 8:48 AM
 

I will look into this for the next release.


 
New Post
5/4/2009 10:31 AM
 

Jon, Thanks. I have to say, with the source change the unorderedlist menus are working great and it's actually a breeze to convert "foreign" skins with css-styled menus to DNN. I always struggled with the table-style menus, as they seemed a bit too limited. Although, with the new css menu styles they are a bit easier to use.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIRenderMode UnordereList and inline stylesRenderMode UnordereList and inline styles


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