4

I'm working on a website and I want to add some shadow to my text, is there an easy way to do this using only css? i tried placing a darker clone of the text under it, but that would be hard on different sizes.

1
  • 1
    I want to point out text-shadow property is not working previous versions of IE. Commented Aug 30, 2012 at 21:48

2 Answers 2

7

You can achieve this using the CSS3 text-shadow property. The general format for specifying this is:

text-shadow: *left-offset* *top-offset* *blur-distance* *color*;

Example Usage:

text-shadow: 2px 2px 1px #000000;

You can create multiple shadows by separating their definitions with commas:

text-shadow: 2px 2px 1px #000000, -2px -2px 1px #111111;

Older versions of IE do not support this property, though; you need to use a filter:

filter: DropShadow(Color=#000000, OffX=2, OffY=2);

Where you replace the values with whatever your preference is.

Note: The answer to your question can be found quite easily using the great search engine Google. Please try that next time before asking a question.

Another note: You really don't have to mention that the website you're working on is an adult website. It's completely irrelevant and might even be a bit dislikable to some users.

Welcome to Stackoverflow, though! I hope that helped!

Sign up to request clarification or add additional context in comments.

2 Comments

@LifeKnife If it works for you, click on the green tick next to the answer to mark it as "accepted."
Don't tell people to search Google for the answer. SO is meant to be THE trusted repository of answers... even Google knows that.
1

you can use css text-shadow any times you want on a text:

text-shadow:1px 0px 2px grey, -1px 0px 2px grey, 0px 1px 2px grey, 0px -1px 2px grey;

will create a shadow whole around the text.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.