Over a million developers have joined DZone.

Replace Text With Images Using CSS

DZone's Guide to

Replace Text With Images Using CSS

Free Resource
This will replace your H1 tag with a 100px by 100px logo.
Users with CSS disabled will see whatever is in 

Company Inc.

users with CSS will see the Company Inc. logo to use this, add this to your stylesheet: h1 { text-indent: -100em; overflow: hidden; background: url(logo.png) no-repeat; height: 100px; width: 100px; }

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}