How to make background image expand proportionally in IE 8?

I have a div with a background image, within a wrapping as such:

<div id="imageholder">
  <div id="image">

#imageholder {
width: 100%;
height: 500px;
overflow: hidden;

#image {
width: 100%;
height: 100%;
background-image: url(image.jpg);
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.jpg', sizingMethod='scale'); 

The filter IE method works somewhat - it stretches the image length wise but not proportionally height wise, like background-size:cover does.

Does anyone know a way to stretch the background image proportionally in IE (so the vertical overflow is hidden by #imageholder)?


Possibly, no method to scale the image in proportion except increase size of the image holder. Here you can set height of imageHolder to percent proportionate to the image referred in the filter.

Try to put imageholder height auto or in percentage.

I made a way to do this in JQuery. Its not the proper way and I dont like it but it may help someone:

$(window).resize(function() {

var windowwidth = $(window).width();

var windowsize = windowwidth - 500;

var windowsize = windowsize + "px";

if(windowwidth > 1100){

      $('#image').css({ height: windowsize });



Need Your Help

Performing many small matrix operations in parallel in OpenCL

matrix opencl gpgpu linear-algebra lapack

I have a problem that requires me to do eigendecomposition and matrix multiplication of many (~4k) small (~3x3) square Hermitian matrices. In particular, I need each work item to perform

Windows equivalent to Linux's readahead syscall?

c windows linux caching system-calls

Is there a Windows equivalent to Linux's readahead syscall?