August 25, 2008
This fixes a very annoying bug in IE by where when you scroll the page becomes corrupted. It relates to the way IE renders pages. This code places a null background image behind, making IE render the page differently.
This can also be place on the body tag unless it already has a background.
- html {
- background: url(null) fixed no-repeat;
- }
Written by Olegs Marhelis · Filed Under CSS, Web Design
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
January 2, 2008
I believe that this image replacement technique works for people with screen reading software. It will make some body’s life easier.
This technique keeps the text visible to the screen reader software and hidden to the user.
This is what you need to do:
<div class=’ReplaceWithImage’>
Invisible Text
</div>
And this CSS code:
.ReplaceWithImage
{
background: url(image.jpg);
text-indent: -7777px;
}
What it does :
I moves text 7777 pixels to the left and places image in it’s place.
Written by Olegs Marhelis · Filed Under CSS, Web Design
Copyright © 2007-2008 Internet Marketing and Web Design - Olegs Marhelis · Login
![]()