DNN Blog

MetaWeblog URL:

New CSS Image Replacement Technique to Improve Performance

Return to Previous Page

  • 10/29/2012
  • 1393 Views

I've used quite a few image replacement techniques in web design in the past to create better typography for the web. But recently I've ran into a technique improved by Scott Kellum that proved to be effective as well as enhancing the performance of the site.

If you're a web designer, you've probably heard of Fahrner Image Replacement technique. It's essentially using CSS text-indent property and set it to a very larger negative number such as -9999px so the text isn't visible to users.

The technique is known for having a performance drawback since the browser has to draw the screen out to the measurement defined in the CSS. Jeff Zeldman recently published an improved technique in his post about this fix based on Scott Kellum's refactor code as follows:

.hide-text {
         text-indent: 100%;
         white-space: nowrap;
         overflow: hidden; }

So use this in your next web design project to eliminate performance drawback in the CSS.

Wanna learn more about different CSS image replacement techniques?
Chris Coyer at CSS-Tricks published a pretty good list here.

Author:

Cuong Dang
Cuong Dang

Cuong Dang is a web standards advocate and user experience designer. He works extensively on web technologies and has helped organizations build better software, websites and applications while putting users and business goals as main focus.

Cuong has published with Wrox on web standards and spoken at various conferences around the country and Europe. He often speaks about topics surrounding HTML5, mobile design, user experience, and general web development best practices.

Cuong redesigned the user experience of DotNetNuke 6 framework, the world's leading open source .NET content management system, to a modern and user friendly state and helped launch the most successful release of the product. 

Cuong co-founded Enliven, a boutique creative technology firm in St. Louis, and is Chief Executive Officer. 

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DNN Blog Archive

Blog Calendar

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.