
Originally Posted by
markbrown4
Hi,
Firstly, don't upscale images with CSS, they'll be blurry.
You'll need to use something like Modernizr which will add a class of 'backgroundsize' to the html element. You can use this to fork your code to support ie.
Code css:
.element {
background-size: 700px auto;
}
.no-backgroundsize .element {
/* other rules */
}
My script is like this now.
Code:
<style>
.background{
background-image:url('background.jpg'),
width: 900px;
height: 700px;
background-size: auto 700px
}
</style>
<div class="background"></div>
but because of real image height is 500px, IE don't enlarge it to 700px
Bookmarks