Reduce space in the navbar

goodshotsgoodshots Registered Users Posts: 7 Beginner grinner
edited December 2, 2014 in SmugMug Customization
Hi,
I want to reduce the space between the menu items in the navbar. Could anybody provide me with the correct CSS code?

Thanks for your help.
Dani

Comments

  • AceCo55AceCo55 Registered Users Posts: 950 Major grins
    edited April 19, 2014
    See post #15 here to see if it does what you want:
    http://www.dgrin.com/showthread.php?t=245699&highlight=menu+spacing
    My opinion does not necessarily make it true. What you do with my opinion is entirely up to you.
    www.acecootephotography.com
  • goodshotsgoodshots Registered Users Posts: 7 Beginner grinner
    edited April 19, 2014
    Hello AceCo55

    Thank you very much for your quick reply. Unfortunately, I wrote my first post too quick. I don't have a horizontal menu - it's a vertical one on the left side (www.goodshots.ch).

    Dani
  • leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited April 21, 2014
    This should work. Feel free to change 7px to something else:
    .sm-page-layout-region-left .sm-page-widget-nav-toplink, 
    .sm-page-layout-region-left .sm-page-widget-nav-toplink:last-child {
       padding: 7px 0px !important;
    }
    
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • goodshotsgoodshots Registered Users Posts: 7 Beginner grinner
    edited April 22, 2014
    Hi Leftquark
    Thanks for your help. It seems it's not possible. With the code you provided, I can increase the space but I can't reduce it (0 px is the standard setting). Doesn't matter. I can live with it :-)
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited April 22, 2014
    goodshots wrote: »
    Hi Leftquark
    Thanks for your help. It seems it's not possible. With the code you provided, I can increase the space but I can't reduce it (0 px is the standard setting). Doesn't matter. I can live with it :-)
    See if this works

    .sm-page-layout-region-left
    .sm-page-widget-nav-vertical li {
    margin-bottom: 10px !important;
    }
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited April 22, 2014
    The extra space between navbar elements is because of the margin-bottom being set to 24px between each element ... as seen here:
    .sm-page-widget-nav .sm-page-widget-nav-popover.sm-page-widget-nav-vertical .sm-page-widget-nav-toplink {
    margin-bottom: 24px;
    }
    

    So if you use something like Allen wrote, or the following, it should work:
    .sm-page-widget-nav .sm-page-widget-nav-popover.sm-page-widget-nav-vertical .sm-page-widget-nav-toplink {
    margin-bottom: 10px !important;
    }
    
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • goodshotsgoodshots Registered Users Posts: 7 Beginner grinner
    edited April 22, 2014
    Hi Allen, Hi Leftquark

    This is the way I like it. Thank you very much to both of you for your help!!!

    Best regards, Daniel
  • BHPixBHPix Registered Users Posts: 1 Beginner grinner
    edited December 1, 2014
    How about the sub menu's that accompany the main nav
    The code you propose works great for the main nav but I would also need similar code for sub menus. It's more esthetics than anything else.
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited December 1, 2014
    BHPix wrote: »
    The code you propose works great for the main nav but I would also need similar code for sub menus. It's more esthetics than anything else.
    Vertical or horizontal menu?
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited December 2, 2014
    BHPix wrote: »
    The code you propose works great for the main nav but I would also need similar code for sub menus. It's more esthetics than anything else.

    Could you post a link to your site so I can generate the code for you?
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
Sign In or Register to comment.