Home>Support>Add title within a custom menu and add a container around widget

Add title within a custom menu and add a container around widget

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hello-

Is it possible to itle within a custom menu or change the formatting of the first menu option? Also, can you add a container around a custom menu?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 8 months ago LaTorri McCray

    My apologies is it possible to add a title within a custom menu or change the formatting of the first menu option? Also, can you add a container around a custom menu?

  2. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Hi LaTorri

    Thanks for reaching out.

    We’d need specifics to try assist further. What would you like to change about the formatting of the first menu option? Are you referring to the parent menu item with drop down items below it?

    Sure, you could use CSS to put a container around a menu. We’d need to see the site and know what color and how thick you want the border to be.

  3. 9 years, 8 months ago LaTorri McCray

    Hi Andrew-

    I am trying to replicate this look:

    [image: Inline image 1]

    I only want users to be able to hover over the links only, not the title. I also want to add a container around the custom menu as well.

  4. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Thanks. The forum isn’t able to accept images via email. Please, upload your image to any public location and insert the link here. We’ll take a look:)

  5. 9 years, 8 months ago LaTorri McCray

    The examples of the menus can be found on this page:
    http://umich.edu/current-students/

  6. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Sure. Add the following to Appearance > Custom CSS:

    /* Custom Menu Widget */
    
    .widget_nav_menu {
    	border: 2px solid #ccc;
      padding: 25px;
    }
    
    .widget_nav_menu ul {
    	list-style: none;
      margin: 0;
      padding: 0;
    }
    
    .widget_nav_menu ul li {
      line-height: 2;
      margin: 0;
    	padding: 0;
    }
    
    .widget_nav_menu ul li a {
    	text-decoration: none;
    }
    

    Edit as required.

  7. 9 years, 8 months ago LaTorri McCray

    Thanks! The title in the widget is actually part of the menu since I could not figure out how to get the title in the custom menu. Is there a way to either turn off the hover on the first menu option? Or is there a way to add a title to the custom menu without it being clickable?

  8. 9 years, 8 months ago LaTorri McCray

    Another question: Is the formatting global to all custom widgets (when using custom css)?

  9. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    1. To put the title in the menu you could add a Custom Link to the menu at Appearance > Menus. Add any URL. Once the Custom Link has been added to the menu, edit it and remove the URL. You should now have a menu item that isn’t clicable.

  10. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    2. These styles are global. To make them row specific you can:

    a. Edit the row the menu widget is in, click Attributes on the right, enter the following into the first field, the Row Class field:

    boxed
    

    b. Change your CSS as follows:

    /* Custom Menu Widget */
    
    .boxed .widget_nav_menu {
    	border: 2px solid #ccc;
      padding: 25px;
    }
    
    .boxed .widget_nav_menu ul {
    	list-style: none;
      margin: 0;
      padding: 0;
    }
    
    .boxed .widget_nav_menu ul li {
      line-height: 2;
      margin: 0;
    	padding: 0;
    }
    
    .boxed .widget_nav_menu ul li a {
    	text-decoration: none;
    }
    
  11. 9 years, 8 months ago LaTorri McCray

    Thanks Andrew! Is there a way to disable hover for the first menu option?

  12. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Sure, try adding something like:

    .boxed .widget_nav_menu li:first-of-type a:hover {
    color: #000;
    }
    

    Set the color in the new rule as required.

  13. 9 years, 8 months ago LaTorri McCray

    I must be doing something wrong. Was I suppose to insert the code into the row(page) or in the Custom CSS? I want to make it global since I would like the first option that appears of all custom menu widgets to be unclickable/no hover. All other menu options should be clickable/hover.

    Thanks.

  14. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    The snippet I sent was intended for Appearance > Custom CSS.

    If you want your custom menu widget CSS to be global, use the following:

    /* Custom Menu Widget */
    
    .widget_nav_menu {
    	border: 2px solid #ccc;
    	padding: 25px;
    }
    
    .widget_nav_menu ul {
    	list-style: none;
      	margin: 0;
    	padding: 0;
    }
    
    .widget_nav_menu ul li {
    	line-height: 2;
    	margin: 0;
    	padding: 0;
    }
    
    .widget_nav_menu ul li a {
    	text-decoration: none;
    }
    
    .widget_nav_menu li:first-of-type a:hover {
    	color: #000;
    }
    

    If you’re using the above, without the “boxed” class, then you don’t need to insert the boxed class name in row settings.

    The last value above refers to the first menu item.

  15. 9 years, 8 months ago LaTorri McCray

    Andrew-

    When I insert the code you provided to disable hover/clicking on the first menu option it removes the hover formatting I created for the remaining menu options.

    background: #ffdd00;
    color: #fff;

    Here is what I am trying to accomplish in the custom menu widget:

    Tools (first item in menu, no hover no click)
    Link 1 (second item in menu, what it to be clickable and hover background/color above)
    Link 2 (third item in menu, what it to be clickable and hover background/color above)

    Here is the code I originally had to format the hover color and background:

    .widget_nav_menu ul li:hover > a {
    background: #ffdd00;
    color: #fff;
    }

    What can I do to have the two formats in the same menu co exist?

  16. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for your feedback. I’d need to see this live to properly assist further.

  17. 9 years, 8 months ago LaTorri McCray

    Is there a way for me to share my site's link with you privately?

    I am trying to replicate the menu option look/functionality as seen on this site: http://umich.edu/current-students/

  18. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.

  19. 9 years, 8 months ago Private Message - LaTorri McCray

    This is a private message.

  20. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Try:

    .widget_nav_menu ul li:first-of-type a {
    	pointer-events: none;
    }
    
    .widget_nav_menu ul li:first-of-type > a {
    	background: none;
    	color: #00053e;
    }
    

    At the bottom of your Custom CSS.

  21. 9 years, 8 months ago LaTorri McCray

    Hi Andrew-

    That did not work.

  22. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Hi :)

    There is an error in your Custom CSS:

    /*.widget_nav_menu li:first-of-type a:hover {
    	color: #000;
    }
    

    /* is a start of a comment, but there is no close meaning that your last two rules won’t render.

    Please, remove the entire contents of Custom CSS and insert the following:

    /* Custom Menu Widget */
    
    .widget_nav_menu {
    	background-color: #e1e7ed;
    	border: 2px solid #00053e;
      	padding: 25px;
    }
    
    .widget_nav_menu ul {
    	list-style: none;
      	margin: 0;
      	padding: 0;
    }
    
    .widget_nav_menu ul li {
    	border-bottom: 1px dotted #00053e;
      	line-height: 2;
     	margin: 0;
     	padding: 0;
    }
    
    
    .widget_nav_menu ul li a {
    	color: #00053e;
    	font-weight: bold;
    	text-decoration: none;	
    }
    
    .widget_nav_menu ul li:hover > a {
     	background: #ffdd00; 
    	color: #fff; 
    }
    
    .widget_nav_menu ul li:first-of-type > a {
    	pointer-events: none;
    }
    
    .widget_nav_menu ul li:first-of-type:hover > a {
    	background: none;
    	color: #00053e;
    }
    
  23. 9 years, 8 months ago LaTorri McCray

    YOU ROCK!

    Thanks so much for your assistance and patience!

  24. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Super :) Glad we were able to help!

    Cheers for now.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More