Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28264

    Hi!

    Using the Shop link in the Propulsion demo as an example, I want to be able to target it and give it a background color. Just that one and none of the other list items in the nav bar. I tried what’s below and it didn’t work. Can I target the single item?

    #menu-item-358 .menu-item menu-item-type-post_type menu-item-object-page menu-item-358 {

    background-color: #333;

    }

    #137055

    Hi!

    You must use valid css code – try:

    #menu-item-358.menu-item.menu-item-358 {
    background-color: #333;
    }

    Best regards,

    Peter

    #137056

    Ah, thank you. I had grabbed the CSS straight from Firebug. Anyway, that works!

    Next question: with that in place, there’s now a big chunk of background color on the left of the text and almost none on the right. What’s the best way to center the text on the background?

    #137057

    Hey,

    You can try:

    #menu-item-358.menu-item.menu-item-358 a {
    right: 15px;
    position: relative;
    }

    Adjust the right position.

    Regards,

    Ismael

    #137058

    Great. Thanks for the help.

    #137059

    Hey,

    Glad we could help. :)

    Cheers,

    Ismael

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

The topic ‘Background color for single item in nav bar’ is closed to new replies.