Last Updated: 01 Nov 2023
|
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
front-end-tech:css:image-replacement-technique [Nov 1, 2023 08:04 AM] 114.119.141.127 old revision restored (Nov 21, 2020 10:39 PM) |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | = CSS Image Replacement = | ||
| - | There are quite a few cases when you'll want to use an image for a headline, section header and the like, but want to keep a text ' | ||
| - | |||
| - | Basically, you create a text header, and then use a CSS class to '' | ||
| - | |||
| - | <code html> | ||
| - | <h1 class=" | ||
| - | Really Important Headline | ||
| - | </h1> | ||
| - | </ | ||
| - | |||
| - | <code css> | ||
| - | h1. myHeadline { | ||
| - | width: 500px; height: 40px; | ||
| - | background: | ||
| - | text-indent: | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | **N.B.:** This image is called the **' | ||
| - | |||
| - | **N.B.:** There is also some difference of opinion as to whether this constitutes a 'black hat' SEO technique, since you're hiding text. General consensus is that it is OK to use it occasionally (e.g. a few headlines, your logo, etc.), but don't go overboard. | ||