• Hey everyone,

    I’m trying to add a background image to the menu above the header. To do that, I thought to open the header.php of my theme, and then write an html code inside the container div of the menu.
    I just use <img src=”…image.jpg”
    But WordPress just makes an empty square with the broken symbol indicating that the image couldn’t be uploaded.
    Why is this happening? Is it impossible to upload an image from the hard drive? The size of the image is small.

    Thanks a lot in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    Background images are typically done via CSS.

    Thread Starter sirhaver

    (@sirhaver)

    Thanks Steve,

    The site is still not up in the internet.
    How can you add an image via CSS? With background-image, you can only add an image from the web, right?
    Thank you

    Thread Starter sirhaver

    (@sirhaver)

    Update:

    I found a way:

    /images/header.jpg”>

    I have no idea why you need to provide a php code to get to the directory if I can just provide the whole path but it’s working so it’s ok(:

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    No, you can use an image that you upload to the media library. So, yes, I guess… it’s on the web. Your web, but the web nonetheless.

    Thread Starter sirhaver

    (@sirhaver)

    Thanks yes I guess it also makes everything simpler, I see that it’s hard for me to code the image as a background for the menu

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding background image to menu’ is closed to new replies.