
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.
chipgrafx 17 Jan, 2008
cssglobe 17 Jan, 2008
<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 17 Jan, 2008
Also, another potential issue would be that you can't _easily_ select the text.
Trevor Davis 17 Jan, 2008
cssglobe 17 Jan, 2008
cssglobe 17 Jan, 2008
Jermayn Parker 18 Jan, 2008
cool tip but I think its time for people to stop <a href=http://germworks.net/blog/2007/12/20/state-of-web-2007/">rehashing current trends</a>...
Jermayn Parker 18 Jan, 2008
http://germworks.net/blog/2007/12/20/state-of-web-2007
sorry
An Jay 21 Jan, 2008
elvisparsley 25 Jan, 2008
Cleo 25 Jan, 2008
Can I to publish in portuguese in my page?
I credit you.
Thanks a lot.
cssglobe 25 Jan, 2008
Bdesign 26 Jan, 2008
Dennison Uy 27 Jan, 2008
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 27 Jan, 2008
Sam Rayner 27 Jan, 2008
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 27 Jan, 2008
Cleo 28 Jan, 2008
I'll send you the link with the article as soon as it's done!
=)
schnuck 3 Feb, 2008
http://www.khmerang.com/index.php?p=95
cssglobe 4 Feb, 2008
chaoskaizer 5 Feb, 2008
suraj 6 Feb, 2008
schnuck 10 Feb, 2008
tom 3 Mar, 2008
The transparent image shows up. Any way to fix this?
cssglobe 3 Mar, 2008
Martyn P 31 Mar, 2008
Anjelina 24 Apr, 2008
Thanks! once again.
Xavier 23 May, 2008
but why must add " background-image: url(none.gif); " ?
Jasper 6 Jan, 2009
Ralph Smith 18 Jan, 2009
Joshua 14 Feb, 2009
Problem: The gradient png sits above my text rather than on top of it (as though it will not occupy the same space). Any ideas?
Eric Pender 11 Mar, 2009
mog 13 Apr, 2009