Skip to Content
Web Design in a Nutshell, 3rd Edition
book

Web Design in a Nutshell, 3rd Edition

by Jennifer Robbins
February 2006
Intermediate to advanced
826 pages
63h 42m
English
O'Reilly Media, Inc.
Content preview from Web Design in a Nutshell, 3rd Edition

The Rundle/Phark Technique

This technique was developed by Mike Rundle for use on his Phark site. It hides the element text by setting an extremely large negative text-indent that pushes the text off the screen to the left where it can’t be seen.

    <h1 id="header">This is the headline.</h1>
     
    #header {
        height:20px;
        text-indent:-5000px;
        background: url(headline.gif) no-repeat;
    }

This method offers the following advantages:

  • No extra span element.

  • Screen reader-accessible.

  • It doesn’t use any hacks.

Disadvantages include the following:

  • It causes problems in Internet Explorer 5.0 for Windows (the background may be moved with the text).

  • It won’t work under the CSS-on/Images-off scenario.

  • Some search engines look down upon pages that use large negative text-indent values.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Responsive Web Design with HTML5 and CSS3

Beginning Responsive Web Design with HTML5 and CSS3

Jonathan Fielding

Publisher Resources

ISBN: 0596009879Errata Page