Contact Us

|

FriendFeed FriendFeed

|

follow us on twitter Twitter

|

 Rss Feed

|

Favorites Add to Favorites

Tuesday, June 30, 2009

How to give text shadow using css

Here is a simple way to give shadow to a text using css.

HTML:
<div id="wrapper">
<span class="firstlayer">Text with shadow using CSS</span>
<span class="secondlayer">Text with shadow using CSS</span>
</div>

CSS:
.firstlayer {
font-size: 18px;
font-weight: bold;
color: #aa0000;
position: absolute;
top: 120px;
left: 20px;
z-index: 1;
}

.secondlayer {
font-size: 18px;
font-weight: bold;
color: #aaa;
position: absolute;
top: 122px;
left: 22px;
z-index: 0;
}

This will give you the result as shown in the picture. I hope this will work in all the browsers.

Labels: ,

2 Comments:

Anonymous Anonymous said...

not up to the mark! id="wrapper" is not there...

September 3, 2009 at 2:05:00 AM PDT  
Blogger Rohan Austin Goes said...

Amazing!! Thanks..

April 9, 2012 at 2:02:00 AM PDT  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home