January 2, 2008
It fixes bug that makes the solution unusable if images are switched off in a browser:
<h1 class=”ReplaceWithImage” id=”ImageHeader”>Replaced Text<span></span></h1>
.ReplaceWithImage{
position:relative;
margin:0px; padding:0px;
/* hide overflow:hidden from IE5/Mac */
/* \*/
overflow: hidden;
/* */
}
.ReplaceWithImage span{
display:block;
position:absolute;
top:0px;
left:0px;
z-index:1; /*for Opera 5 and 6*/
}
#ImageHeader, #ImageHeader span{
height:100px;
width:300px;
background-image: url(image.jpg);
}
Written by Olegs Marhelis · Filed Under CSS, Web Design
Got something to say?
Copyright © 2007-2008 Internet Marketing and Web Design - Olegs Marhelis · Login
![]()