written on:17 Jan, 2008 by Alen Grakalic
Css Text Gradient
Delicious | Digg | Stumble | Reddit | Float | Subscribe to RSS Feed

Css Globe is happy to present a simple trick that helps you improve your site's appearance. With this trick you can use cool gradients on system fonts with nothing but pure css.
We use an empty span element, nested inside a heading tag. Span has transparent png set as a backgrund image and it is placed above the heading text with absolute position.
Take a look at the demo page and share your thoughts.
Take a look at the Demo | Download TextGradient
About the author:
Designer, developer and a passionate standardista with large experience in all types of front-end work. Started to get involved with web in 1999. and turned freelance in 2005., the same year he started Css Globe. Alen's work has been featured on numerous css galleries including famous Css Zen Garden official list. Available for contract work.
Enjoyed the article?
Subscribe to our RSS feed or share it with your friends.
Delicious | Digg | Stumble | Reddit | Float | Subscribe to RSS Feed
Comments
Subscribe
Join 4700+ subscribers and receive our content instantly.
Follow us on Twitter
Want to be the first to know when a new article is published?
Sponsors

Sitegrinder 2 Photoshop Plugin

RF Image Subscriptions from $79

Look Professional with FreshBooks

FlashDen - The Best Flash Files
Recent Articles
- CSS do's and dont's Part 2- Markup
- Easiest Tooltip and Image Preview Using jQuery
- 4 Uber Cool Css Techniques For Links
- CSS do's and dont's Part 1: CSS Selecting
- Easy Scroll: Accessible Content Scroller






chipgrafx on 17 Jan, 2008 wrote:
cssglobe on 17 Jan, 2008 wrote:
<h2><a href="#">Title<span></span></a></h2>
However, both are now block level elements so you might want a little more css to adjust the widths. I will publish an update with working anchors.
chipgrafx on 17 Jan, 2008 wrote:
Also, another potential issue would be that you can't _easily_ select the text.
Trevor Davis on 17 Jan, 2008 wrote:
cssglobe on 17 Jan, 2008 wrote:
cssglobe on 17 Jan, 2008 wrote:
Jermayn Parker on 18 Jan, 2008 wrote:
cool tip but I think its time for people to stop rehashing current trends...
Jermayn Parker on 18 Jan, 2008 wrote:
http://germworks.net/blog/2007/12/20/state-of-web-2007
sorry
An Jay on 21 Jan, 2008 wrote:
elvisparsley on 25 Jan, 2008 wrote:
Cleo on 25 Jan, 2008 wrote:
Can I to publish in portuguese in my page?
I credit you.
Thanks a lot.
cssglobe on 25 Jan, 2008 wrote:
Bdesign on 26 Jan, 2008 wrote:
Dennison Uy on 27 Jan, 2008 wrote:
http://blog.codesignstudios.com/wp-content/uploads/2008/01/gradient-error1.png
Might be a random bug though. Anyone else experience the same problem?
Dennison Uy - Graphic Designer on 27 Jan, 2008 wrote:
Sam Rayner on 27 Jan, 2008 wrote:
http://samrayner.com/archives/span_free_gradient_text_effect/
Internet Explorer users will get just plain text with my method though so it's a trade off. Consider it an alternative. :)
s4l1h on 27 Jan, 2008 wrote:
Cleo on 28 Jan, 2008 wrote:
I'll send you the link with the article as soon as it's done!
=)
schnuck on 3 Feb, 2008 wrote:
http://www.khmerang.com/index.php?p=95
cssglobe on 4 Feb, 2008 wrote:
chaoskaizer on 5 Feb, 2008 wrote:
suraj on 6 Feb, 2008 wrote:
schnuck on 10 Feb, 2008 wrote:
tom on 3 Mar, 2008 wrote:
The transparent image shows up. Any way to fix this?
cssglobe on 3 Mar, 2008 wrote:
Martyn P on 31 Mar, 2008 wrote:
Anjelina on 24 Apr, 2008 wrote:
Thanks! once again.
Xavier on 23 May, 2008 wrote:
but why must add " background-image: url(none.gif); " ?