The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Add a dash to WordPress submenu

  • # June 16, 2013 at 3:36 pm


    I have been working on this website with WordPress

    [website]( “website”)

    And think I have got most of it sorted now regarding responsive design !!

    But I wanted to add a dash (-) before the submenu links so when on a smaller screen the visitor will now what parent the submenu is under.

    Now I know how to do this when coding on a static site but how the hell do i do this on a wordpress website ??

    Thanks in advance.

    # June 16, 2013 at 5:13 pm

    Well, you could do it with a `:before` selector. Something like:

    ul ul li:before {
    content: “-“;

    # June 25, 2013 at 2:56 pm

    Thanks for the reply but I cant seem to get that to work !!

    # June 25, 2013 at 2:59 pm

    Here’s an example:

    # June 25, 2013 at 3:00 pm

    I don’t see you putting @TheDoc‘s suggestion anywhere in your CSS files. Hard for us to figure out why you can’t get it to work that way…

    # July 17, 2013 at 5:39 am

    Thanks for the demo @TheDoc. I have managed to do this now with a bit of help. I dint really explain it properly.

    I was tryng to have the dash just on mobile size devices and not on desktop.

    # July 17, 2013 at 5:42 am

    >I was tryng to have the dash just on mobile size devices and not on desktop.

    A media query should deal with that.

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed