page background shrinks with window

M

meagain

<style type="text/css"> body { padding-left: 20px; background-image:
url('NowPlayBkgnd.jpg');
background-repeat: no-repeat; background-attachment: fixed; background-size: 100%; }
</style>

The .jpg fills the screen nicely when the window is full width, but if the
window shrinks the background shrinks proportionally thus leaving not-picture
at the bottom of the user's screen.

Is there a way to say not-isometric or fill to bottom of screen or other approach?
 
G

Gus Richter

<style type="text/css"> body { padding-left: 20px; background-image:
url('NowPlayBkgnd.jpg');
background-repeat: no-repeat; background-attachment: fixed;
background-size: 100%; }
</style>

The .jpg fills the screen nicely when the window is full width, but if the
window shrinks the background shrinks proportionally thus leaving
not-picture
at the bottom of the user's screen.

Is there a way to say not-isometric or fill to bottom of screen or other
approach?

add: background-size:cover;

support: <http://caniuse.com/#search=background-size>
 
D

dorayme

meagain said:
<style type="text/css"> body { padding-left: 20px; background-image:
url('NowPlayBkgnd.jpg');
background-repeat: no-repeat; background-attachment: fixed; background-size:
100%; }
</style>

The .jpg fills the screen nicely when the window is full width, but if the
window shrinks the background shrinks proportionally thus leaving not-picture
at the bottom of the user's screen.

Is there a way to say not-isometric or fill to bottom of screen or other
approach?

The other approach is to prepare a large picture that fills most
screens and is suitable if not all of it shows on some viewport sizes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top