Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Dealing with a diagonal background image (not a pattern) Reply To: Dealing with a diagonal background image (not a pattern)

#145757

I think you would have to use javascript indeed.

You could go with something like

var yourimage = document.getElementyById('yourimagesid');
yourimage.style.height = window.innerHeight+"px";

and the CSS would just be:

#yourimage {
width: auto;
position: absolute;
top: 0px;
right: 0px;
}

and make sure that you call the javascript function after the image is loaded. Also you might need an image at a higher resolution, since some desktop computers can have windows as high as 1500px or even more.

I hope this is the effect you wanted to achieve, I was not quiet sure after reading your post.