A better image replacement technique
5th August 2003
Over on Kryogenix, Stuart has solved the CSS image replacement problem with some clever application of the overflow: hidden;
property. The Fahrner Image Replacement technique is often used to replace a heading with a background image (see most of the designs in the CSS Zen Garden for examples), but has the disadvantages that it requires an additional <span>
tag to be added to the code and that some screen readers which follow the display: none;
directive skip straight over the replaced text without reading it. Stuart’s new technique solves both problems, and works in modern browsers from IE 5/Win upwards.
More recent articles
- My AI/LLM predictions for the next 1, 3 and 6 years, for Oxide and Friends - 10th January 2025
- Weeknotes: Starting 2025 a little slow - 4th January 2025
- I still don't think companies serve you ads based on spying through your microphone - 2nd January 2025