Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 995107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:40:16+00:00 2026-05-16T06:40:16+00:00

I am trying to code a clean html5 website. I am using the html5

  • 0

I am trying to code a clean html5 website. I am using the html5 boilerplate as the base of the website. It comes with modernizr. For the page title I am using text-shadow and font-face and have set up a small css fallback via modernizr (when one of the features is not available, a png image will be shown as background).

So the code is

<h1 id="header-title">Title here</h1>

But, as you may have guessed, when I set the fallback png image as background, the “Title here” text is still there. Do you know any way to take that text out? I want it to be as clean as possible. That’s why i didn’t use any text-indent, or javascript to erase innerHTML.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:40:16+00:00Added an answer on May 16, 2026 at 6:40 am

    I believe your best option would be to use the Gilder/Levin image replacement technique – text stays but is covered up by the graphic.

    Google seems ok with it as discussed in this link, as long as it is not deceptive in nature. (and as long as your graphic says the same thing as the text you aren’t being deceptive)

    http://mezzoblue.com/archives/2008/05/05/image_replac/

    The Mezzoblue site also has a nice summary of all the popular image replacement techniques.

    Here is the Gilder/Levin technique (copied directly from the Mezzoblue site) – you add an empty span tag where your replacement image lives and with absolute positioning you stack it on top of the original text. Now, maybe the extra span tag doesn’t meet your “clean” requirement, but any other technique that hides or removes the real text is worse, in my opinion.

    Maybe the cleanest solution is a slightly degraded experience for visitors who can’t use the font-face? Properly set-up, you should be able to reach 99 percent(ish) of visitors with at-font-face.

    <h3 id="header">
        <span></span>Revised Image Replacement
    </h3>
    
    /* css */
    #header {
        width: 329px;
        height: 25px;
        position: relative;
        }
    #header span {
        background: url(sample-opaque.gif) no-repeat;
        position: absolute;
        width: 100%;
        height: 100%;
        }
    

    ** UPDATE **

    The one downside to Gilder/Levin is the replacement image must be opaque. If it’s transparent, the original text may show thru depending on what the graphic looks like.

    The Leahy/Langridge Method will work with transparent images (Apple uses this technique for their nav menu) – the only downside I know is if someone is browsing with images turned off and css turned on they may not see any content.

    again, from Mezzoblue site

    <h3 id="header">
        Revised Image Replacement
    </h3>
    
    /* css */
    #header {
        padding: 25px 0 0 0;
        overflow: hidden;
        background-image: url(sample-opaque.gif);
        background-repeat: no-repeat;
        height: 0px !important;
        height /**/:25px;
        }
    

    another option if failing the “css-on, images-off” scenario is unacceptable – single pixel image replacement. the technique can be found at
    mezzoblue.com/tests/revised-image-replacement/
    and as noted in another response
    css-tricks.com/css-image-replacement/
    (sorry for incomplete links – I’m currently only allowed 1 link per post. add a www to the front of each of the previous URL’s to view an assortment of image replacement techniques)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im really trying to keep my code clean by using the switch statement but
I'm trying to parse a website's source to extract text inside using lxml library.
I'm trying to keep my code clean and keep the number of files down.
trying to refactor code to provide clean association A GAME has a HOME_TEAM and
I'm trying to clean duplicate code. The only difference are calls like MyType x
I'm trying to clean up some warnings in some old Java code (in Eclipse),
I am trying to make my code more clear using the include function of
I am trying to code AES using Cipher Block Chaining(CBC) mode. I am pretty
I'm trying to compile and run the task-android-sample code from Google's API website. I
Currently, I am trying to clean up an HTML file using JTidy, convert it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.