[Resolved] Change background color last main menu-item

Home Forums Support [Resolved] Change background color last main menu-item

Home Forums Support Change background color last main menu-item

  • This topic has 5 replies, 3 voices, and was last updated 2 weeks ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2073779
    Henk

    Hi,

    I would like to change the background color of the last main menu-topic.
    To make a small test I specified some CSS by using a red border (see website).

    The problem is that the height of the main menu is quite large and out of proportion. I needed more height for the menu because I need to make the logo bigger.

    How can I improve this?

    Thanks Henk

    #2073811
    Leo
    Staff
    Customer Support
    #2074178
    Henk

    Hi Leo,

    I had almost the same CSS:

    .main-navigation .main-nav ul li.menu-item:last-child a {
    	border: solid 5px red;
    	border-radius: 8px;
    	line-height: 2.5em;
    	padding-left: 1em;
    	padding-right: 1em
    	}

    The line-height was the trick.

    I also used em and not px, can you tell me the best-practice?
    And is padding the right method in this case?

    Thanks
    -Henk.

    #2074415
    David
    Staff
    Customer Support

    Hi there,

    1. Best practice – EMs most definitely for Line Height. For Padding thats up to you – i generally work with pixels on padding if i don’t want the padding to change if the font size changes.

    2. Padding is the correct property for making the element wider in this case.

    #2074629
    Henk

    Thanks again!

    #2075170
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.