Adrián Vázquez Adrián Vázquez - 1 year ago 94
CSS Question

Responsive background with a long height image

I have a really long image, 2263 x 8192 pixels. I would like to create a website with a background (of that image) that covers the width of the window, but also with the full height of the image, without losing responsiveness.

The idea is to have this long scrolling image, divided in different/sections parts with a fix height. Exactly as a landing page with different sections, but instead of having different backgrounds for each section, I want a long image.

Any ideas?

Answer Source
body {
    width: 100%;
    height: 100%;
    background: url('') no-repeat;
    background-size: cover; 
    color: #fff;


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download