How to give text shadow using css


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Here is a simple way to give shadow to a text using css.
  2.  
  3. HTML:
  4. <div id="wrapper">
  5. <span class="firstlayer">Text with shadow using CSS</span>
  6. <span class="secondlayer">Text with shadow using CSS</span>
  7. </div>
  8.  
  9. CSS:
  10. .firstlayer {
  11. font-size: 18px;
  12. font-weight: bold;
  13. color: #aa0000;
  14. position: absolute;
  15. top: 120px;
  16. left: 20px;
  17. z-index: 1;
  18. }
  19. .secondlayer {
  20. font-size: 18px;
  21. font-weight: bold;
  22. color: #aaa;
  23. position: absolute;
  24. top: 122px;
  25. left: 22px;
  26. z-index: 0;
  27. }

URL: http://htmlcsstutorials.blogspot.com/2009/06/how-to-give-text-shadow-using-css.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.