HOW TO DECREASE SPACE BETWEEN MENU ITEMS IN TWENTY TWELVE

Featured Theme Forums CSS and PHP HOW TO DECREASE SPACE BETWEEN MENU ITEMS IN TWENTY TWELVE

This topic contains 4 replies, has 2 voices, and was last updated by  abhisekpadhi 1 year, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13397

    abhisekpadhi
    Participant

    Referrence URL:-http://www.abhisektech.tk

    HOW TO DECREASE SPACE BETWEEN MENU ITEMS IN TWENTY TWELVE,

    This could help me to display more menu items in a single line and with bigger font size.

    #15185

    Zeaks
    Participant

    This is the CSS for the menu items, decrease the 2.85714rem margin to whatever fits for you. This can be added to the custom CSS area
    .main-navigation li {
    margin: 0 2.85714rem 0 0;
    position: relative;
    }

    #15186

    abhisekpadhi
    Participant

    Thank You.
    but adding the above code directly to the child theme won’t work.

    So I added this code to make it work: (FOR TwentyTwelve)

    @media screen and (min-width: 600px) {
    .main-navigation li {
    margin: 0 40px 0 0;
    margin: 0 1.857142857rem 0 0;
    position: relative;
    }
    }

    @media screen and (min-width: 600px) {<br />
    .main-navigation li {<br />
    margin: 0 40px 0 0;<br />
    margin: 0 1.857142857rem 0 0;<br />
    position: relative;<br />
    }<br />
    }
    #15187

    Zeaks
    Participant

    You’re using margin twice for the same element, the second one is overriding the first.

    #15188

    abhisekpadhi
    Participant

    Yeah! I got it zeaks,
    I should use:
    @media screen and (min-width: 600px) {
    .main-navigation li {
    margin: 0 1.857142857rem 0 0;
    position: relative;
    }
    }

    I had copied that code from parent theme’s style.css file.

    @media screen and (min-width: 600px) {<br />
    .main-navigation li {<br />
    margin: 0 1.857142857rem 0 0;<br />
    position: relative;<br />
    }<br />
    }

    I had copied that code from parent theme’s style.css file.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.