This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

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

Resolved 24 replies premiumthemetheme-vantage
10 years ago · Last reply by Andrew Misplon 10 years ago

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.

Need fast email support? Get SiteOrigin Premium

Replies

24
  1. LaTorri McCray 10 years, 3 months ago

    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. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

    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. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

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

  6. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

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

  9. Andrew Misplon Staff 10 years, 3 months ago

    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. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

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

  12. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

    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. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

    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. Andrew Misplon Staff 10 years, 3 months ago

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

  17. LaTorri McCray 10 years, 3 months ago

    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. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray Private 10 years, 3 months ago

    This is a private message.

  20. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

    Hi Andrew-

    That did not work.

  22. Andrew Misplon Staff 10 years, 3 months ago

    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. LaTorri McCray 10 years, 3 months ago

    YOU ROCK!

    Thanks so much for your assistance and patience!

  24. Andrew Misplon Staff 10 years, 3 months ago

    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.

Have a different question or issue?

Start New Thread