• Resolved merich

    (@merich)


    I recently bought my own domain and have been playing around with CSS. I’ve figured out how to change my header image size but using the background: url(”) code doesn’t work. At all. I’ve tried it with several different images from different places and nothing ever shows up!
    Here’s my CSS header code:

    #header {
    	padding: 30px 0 0 0;
    }
    
    #headerimg {
                  display: block;
                  background: url('Picture 2.png')
    	margin: 0 auto;
    	margin-bottom: 17px;
    	height: 190px;
    	width: 700px;
    }

    I can still upload a header through the header uploader but can’t do a custom one in my code. That link is hosted through Filezilla.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter merich

    (@merich)

    Those two shouldn’t be that spaced over. Woops!

    there is no element with a css id of #headerimg in your site.

    where do you want to add the background image?

    and if the image exists, it is in the wrong place for what is referenced in style.css

    where is the location of that image?

    Thread Starter merich

    (@merich)

    I want the image above my site title. It was originally on my desktop but for it to have a link I had to have a host so I downloaded filezilla and put it on there. So that’s where it is now.

    Thread Starter merich

    (@merich)

    Did that make sense?

    image location would be what you type into the browser to see the image.

    the css style looks for the image here: https://yoursite.com/wp-content/themes/brunelleschi/Picture 2.png

    (and the image is not there)

    (it might also be better to use an image name without spaces)

    something like this might work:

    #header{ padding-top: 70px; background: url(??????) center top no-repeat; }

    where the value of the padding should match the height of the image.

    https://www.w3schools.com/css/

    Thread Starter merich

    (@merich)

    AHH! THANK YOU SO MUCH! It worked! I had to up the px in the padding but it’s working! Thank you so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CSS Header not showing.’ is closed to new replies.