Hi,
IE6 and 7 don't understand the keyword inherit so they will just have auto widths and will spill out unless you add overflow:hidden to the parent.
To put the text under the parents background in IE6 then remove the position:relative from the parent and at the same time remove the co-ordinates from the child.
If you leave top and left in place then the element is placed in respect of the nearest positioned ancestor or the viewport if none exists. If you omit the co-ordinates then the element becomes absolutely positioned at the point it currently occupies in the flow which is exactly where you want it. You just have to make sure that text-alignment is set to left or IE will mis-position the element.
Code:
#logo {
display:block;
background: red url(logo.jpg) no-repeat;
height:100px;
width:150px;
overflow:hidden;
}
#logo span {
position:absolute;
z-index:-1;
height:100px;
width:150px;
}
Does that answer your question
Bookmarks