9. August 2008 by Janko in Tutorials | tags:

When I first saw CSS text gradient effect I asked myself how this trick can be used to create some more effects. Actually, there are an infinite number of effects you can create - the limit is your imagination. In this short tutorial you will see how to add grunge effect to your text using just CSS and one image.

Step 1: Create a transparent PNG image

You can use Gimp or Photoshop and some of the free brushes:

Experiment with the brushes and color, but keep in mind that the color you use must match the color of your background. The image we are going to use in this example looks like this:

grunge2

So, we are going to make a grunge effect on a black background.

Step 2: Create simple CSS

Now we are going to add grunge effect on H1 element. In order to make this work we need a little trick: place an empty span tag inside each H1 element. Be sure to add it after the text like in the example below.

<h1>This is one very long title with grunge effect<span></span></h1>

Now the CSS magic. We are going to use absolute positioning inside relative positioning (I mentioned this in my article How to create web application user interface that looks like Outlook several weeks ago). So, we are going to place absolutely positioned span element inside the relatively positioned H1 element. That way a grunge image that is actually a background image of span element will make an overlay on H1 element.

h1 {
    position:relative;
    color:#aeef33;
    font-family: Georgia;
}

h1 span{
    position:absolute;
    display:block;
    top:0;
    left:0;
    height:100%;
    width:100%;
    background:url('grunge.png');
}

And viola! This is the result:

grunge effect

Download the example See it live

Step 3: Experiment

Try to find some interesting brushes or patterns which you can use to create a different effects. For more information about CSS text effects, read the following articles:

If you liked this article why don't you share it:

Add grunge effect to text using simple CSS (via @jankowarpspeed) Share this on StumbleUpon Share this on delicious Share this on Digg Share this on Dzone Share this on DesignBump Send this to friend

Comments

Pingbacks and trackbacks

  1. Trackback from DotNetKicks.com Add grunge effect to text using simple CSS
  2. Pingback from designm.ag Add Grunge Effect to Text Using Simple CSS | DesignM.ag
  3. Pingback from colordeu.es Fondo Grunge en texto con CSS - colorate
  4. Pingback from nsdhami.wordpress.com 25 Awesome tutorials for web designers « Narendra Dhami
  5. Pingback from guiwells.wordpress.com 25 Awesome tutorials for web designers « Guiwells’s Blog
  6. Pingback from soft-911.net From free for free » Blog Archive » 25 Awesome tutorials for web designers
  7. Pingback from alexilin.ru Как сделать текст в стиле грандж используя немного CSS | HTML и CSS, доступность и юзабилити — Life Style
  8. Pingback from boxedcss.com 25 Awesome tutorials for web designers | Boxed CSS
  9. Pingback from cnet.ro Janko ÅŸi aspectul formularelor web | CNET.ro
  10. Pingback from missakins.com m i s s a k i n s » Blog Archive » links for 2008-08-24
  11. Pingback from yogodoshi.com Tutorial: Como colocar um efeito grunge em um texto apenas com CSS - Blog do yogodoshi - Tecnologia, Blogosfera, web 2.0 e Humor é claro!
  12. Pingback from pejag.cn 25 Awesome tutorials for web designers | 打篮球的手
  13. Pingback from rssa.org.cn RSSA聚合 » 25 Awesome tutorials for web designers
  14. Pingback from alexawesome.com alexawesome.com » Blog Archive » Geek Week - Cool Stuff for the week of 09/08/08
  15. Pingback from desizntech.info Discover the “Cool” of CSS: 25 Advanced CSS Techniques | Desizn Tech
  16. Pingback from booto.net 25个CSS教程 - Booto’Blog
  17. Pingback from diariobv.com 25 Awesome tutorials for web designers | Diario BV
  18. Pingback from diariobv.com 25 Awesome tutorials for web designers | Diario BV
  19. Pingback from tisswb.cn 惊奇CSS:25 个高级CSS技巧 | 奔向远方
  20. Pingback from 221.194.109.238 克兰印象 » 25个高级CSS技巧教程
  21. Pingback from freecss.info Free CSS Templates » Top 7 link and text effects using javascript/css
  22. Pingback from developer.cmzmedia.com » Fun with Fonts CMZ Media Developer
  23. Pingback from pengblog.com 神奇的CSS-25个样本迷死你 | 鹏博客
  24. Pingback from 365bibei.com 365必备资讯网 » Blog Archive » 25个高级CSS技巧教程
  25. Pingback from designertutorials.net Add Grunge Effect to Text using SimpleCSS | DesignerTutorials
  26. Pingback from noupe.com 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | Noupe
  27. Pingback from tech.cyooh.com 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | Cyooh.com
  28. Pingback from wpconfig.com Wordpress Blog Services - 20+ Wicked Proof of Concepts for Better use of jQuery/CSS
  29. Pingback from invisibile.org 20+ Wicked Proof of Concepts for Better use of jQuery/CSS
  30. Pingback from n3t.ir 20+ Wicked Proof of Concepts for Better use of jQuery/CSS « N3t.ir - Web Resources, Web Design News & Tips, Open Source
  31. Pingback from e-szablony.eu 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | e-szablony.eu - Tutoriale, Kursy
  32. Pingback from webmaster.cyooh.com 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | cyooh.com
  33. Pingback from neurosoftware.ro 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | Programming Blog
  34. Pingback from moeiseur.com 20+ Wicked Proof of Concepts for Better use of jQuery/CSS
  35. Pingback from reader.misrit.org 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | Misr IT Reader
  36. Pingback from 77even.net 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | 77even
  37. Pingback from exception.baywords.com Text overlay effect
  38. Pingback from answerspluto.com list of urls - 5 « Answers Pluto
  39. Pingback from moeiseur.com 20+ Wicked Proof of Concepts for Better use of jQuery/CSS
  40. Pingback from paranimage.com 25个高级CSS技巧教程 | 帕兰映像
  41. Pingback from topsy.com Twitter Trackbacks for Add grunge effect to text using simple CSS [jankoatwarpspeed.com] on Topsy.com
  42. Pingback from downrex.com 20+ Wicked Proof of Concepts for Better use of jQuery/CSS | Downrex
  43. Pingback from theme-center.com Discover the “Cool” of CSS: 25 Advanced CSS Techniques | Theme Center
  44. Pingback from 1stwebdesigner.com 22 Advanced CSS Text Effects And Web Typography Tips | Graphic and Web Design Blog -Resources And Tutorials
  45. Pingback from webdesign.indoweblog.com 22 Advanced CSS Text Effects And Web Typography Tips | Web Design
  46. Pingback from caintechnews.wordpress.com 22 Advanced CSS Text Effects Tips « Caintech.co.uk
  47. Pingback from cyberdesignz.com 100+ CSS Tools and Frameworks - CSS Tips and Tricks | Web Design and Development - Blog
  48. Pingback from prasadsambari.abhista.com prasadsambari » Blog Archive » Advanced CSS Text Effects Tips
  49. Pingback from meshdiary.co.cc 22 Advanced CSS Text Effects And Web Typography Tips | meshdairy
  50. Pingback from dannymercado.com Danny Mercado's Blog
  51. Pingback from desizen.com 22个CSS文字效果和WEB排版提示 - DesiZen
  52. Pingback from grafikeditor.com 22 Advanced CSS Text Effects And Web Typography Tips « Grafik Editor Graphic .ru

Add comment

   
        Country flag
biuquote
Loading