DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

adding class to only one submenu

Sort:
You are not authorized to post a reply.





New Around Here





    Hi, 
    I've been asked to make a change to our DNN application.  We have 4 root menus and the first 3 have 3 columns of submenus and have a width of 1164px...unfortunately the 4th root menu has only 1 submenu and it displays all the way to the left (float: left) and still maintains the 1164px width. I need to make that submenu width smaller and float:right...I can do that at runtime using F12 and applying a new class to only that submenu but how do I do that permanently?  I don't see a way to apply a class to only one of the submenus.






    Growing Member





      look at :nth-child() in css

      for example
      li:nth-child(4) { color: red; }





      New Around Here





        Thanks for the reply...but how do I apply that to only the submenu of the 4th root menu option?






        Growing Member





          You have identified the submenu that you need to change. Find the css rule (or "selector") that is common to all submenus at that level. Use the :nth-child(4) to make a specific css rule for the 4th submenu.
          You are not authorized to post a reply.

          These Forums are dedicated to the discussion of DNN Platform.

          For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

          1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
          2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
          3. 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.
          4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
          5. No Flaming or Trolling.
          6. No Profanity, Racism, or Prejudice.
          7. Site Moderators have the final word on approving / removing a thread or post or comment.
          8. English language posting only, please.

          Would you like to help us?

          Awesome! Simply post in the forums using the link below and we'll get you started.

          Get Involved