Code to place image behind menu

  • Unknown's avatar

    I need the css to change the background of my menu to a picture.

  • Unknown's avatar

    You’re in the wrong forum and need to be at WordPress.ORG for help with that version of the software.

  • Unknown's avatar

    Hi there, if you are talking about escortinternetdesign.co, which is hosted here at WordPress.com, then you can add an image to the background of the menu (when toggled open) with the following.

    #sidebar {
    background: url("URL_OF_IMAGE") no-repeat scroll 0 0 transparent;
    }

    Adding a background image behind text can be a challenge if the image has light and dark colors in it, so you many also have to work with the text color as well.

  • Unknown's avatar

    Wow. It’s working. Check it out http://escortinternetdesign.co

    Thanks

  • Unknown's avatar

    You are welcome. I’d darken up the text a little on the reddish as it is a little hard to read, but it looks good!

  • Unknown's avatar

    Thank you. Can you help me with the code for that?
    Gail

  • Unknown's avatar

    Sure thing. I worked off the existing non-hover and hover colors and just darkened them up a bit. You can of course adjust them as desired.

    .widget a, .wp-caption a, .main-navigation a, .widget_flickr #flickr_badge_uber_wrapper a:link, .widget_flickr #flickr_badge_uber_wrapper a:active, .widget_flickr #flickr_badge_uber_wrapper a:visited {
        color: #ee6655;
    }
    .widget a:hover, .widget a:active, .widget a:focus, .wp-caption a:hover, .wp-caption a:active, .wp-caption a:focus, .main-navigation a:hover, .main-navigation a:active, .main-navigation a:focus, .widget_flickr #flickr_badge_uber_wrapper a:hover {
        color: #ee8888;
    }
  • Unknown's avatar

    I had a hard time typing it all in, but the results are fab! Thank you so much. You have an awesome gift ~

    Regards,
    Gail

  • Unknown's avatar

    You are welcome and thanks Gail. Instead of typing it all in, you can copy and paste the code I gave above directly into the CSS edit window. As long as code you get here is within the grey box like above, it is safe to copy/paste.

  • The topic ‘Code to place image behind menu’ is closed to new replies.