Grow your CSS skills. Land your dream job.

Stumper: How to add spacer in the center of a horizontal menu for a badge

  • # January 25, 2012 at 12:53 am

    Hi — I’d like to use CSS to put a spacer in a WordPress horizontal menu. The menu is bisected by a badge. So I want something like

    link1 link2 link3 [spa- Badge -cer] link4 link5 link6

    It would be great to allow the site owner to change the menu at will and not worry about messing up the flow of menu links around the badge.

    Can CSS do this???

    # January 25, 2012 at 12:59 am

    You could use javascript to drop the badge in. That way it won’t mess up the menu, rather work with it. So you would have (after javascript has added the badge):

    Is that what you’re looking for?

    # January 25, 2012 at 1:01 pm

    Wow thank you for the fast reply. Actually I don’t have the badge in the UL list. It is in a separate div, just overlaying the menu. This is to center it exactly.

    I think I will try this from a different angle (like, a different layout)

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".