Home › Forums › CSS › Dealing with a diagonal background image (not a pattern) › Reply To: Dealing with a diagonal background image (not a pattern)
August 5, 2013 at 1:46 pm
#145757
Historical Forums User
Participant
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.