PDA

View Full Version : css overlay


spenoir
07-30-2004, 02:46 PM
Now then,
Anyone got any ideas on how to make this bit css work in IE? If not does anyone have a hack or something that hides it in IE?
Many Thanks,
;)

#overlay {
background: transparent url(image.png) no-repeat center;
position: fixed;
border: none;
margin-top: 450px;
margin-left: -200px;
width: 500px;
height: 500px;
padding: 0 0 0 0;
z-index: 20;
}

Donkey
07-30-2004, 03:26 PM
IE doesn't recognise position fixed. There is a hack here that gets round it.http://devnull.tagsoup.com/fixed/

spenoir
07-30-2004, 03:27 PM
I've just tried the javascript hack which is talked about in earlier threads. IE does seem to like margin-top: although margin-left: kind of works. It also repeats it too. Maybe i'll try putting an <img> in the html.

mindlessLemming
07-30-2004, 03:28 PM
I'm far too tired to walk your through an attempt at png support in IE...


/*---Ignored by IE --*/
html>#overlay {
background: transparent url(image.png) no-repeat center;
position: fixed;
border: none;
margin-top: 450px;
margin-left: -200px;
width: 500px;
height: 500px;
padding: 0 0 0 0;
z-index: 20;
}
/* IE Windows ONLY \*/
* html #overlay {
background: transparent url(imagealternative.gif) no-repeat center;
}
/* end 'hide from IE mac hack' */


Take your pick :)