Share what you are working on and using!

Added a header image to my music blog using the CSS script below:

@media only screen and (min-width: 800px) {
    body#collection header {
        padding-top: 2em;
        text-align: center;
        max-width: 100%;
        margin: 0 0 0 0;
        background-image: url('yourImage.jpg');
        height: 572px;
        background-repeat: no-repeat;
        background-size: cover;
    }
}

I’m sure someone can use this and make it even better. The media query is to remove the header image when viewing the site on a phone because I didn’t know how to handle it. Now that I think about it, I can probably just use a smaller image on smaller screens. Anyway, you get the idea.

2 Likes