<h3 id="header">
<span>Revised Image Replacement</span>
</h3>
/* css */
#header {
width: 329px;
height: 25px;
background-image: url(sample-opaque.gif);
}
#header span {
display: block;
width: 0;
height: 0;
overflow: hidden;
}
This technique is buggy in IE5.5 on Windows 98. The hidden text within the spans while not displaying will actually still create a box which will flow to the total natural height of the measure. So if you have something that flows to 3 lines in the width of that h3 tag the h3 box will be 3 line-heights in depth dispite the fact you’ve told it not to display.
«0 CommentsMay 18, MMV»
You've arrived at the homepage of Stephen Stewart. The archive is available here for those who want it. This site is happily hosted by Dreamhost. Click for more?
More!? OK then, but I can't help feeling that this will be a disappointment to you.
I work as a web designer in Belfast, and I live by the sea in a shoe. You can see me here, doing my livejournal pose as idoru called it. If you need to you can email me at carisenda -at- gmail -dot- com.