user3575238
user3575238

Reputation: 1

Adding font borders to CSS code

As the title suggests, I'm trying to add font borders to the text I have in a page I'm making. The background has a lot of reds, greens, yellows and blacks so a single colour really wouldn't suffice. Here is the code.

I know I can do something with webkit like this:

h1 { -webkit-text-stroke: 1px black; }

But since it's not supported on browsers I'm stuck on square one.

Can anyone help me?

Upvotes: 0

Views: 124

Answers (3)

Rupesh Terase
Rupesh Terase

Reputation: 460

http://www.w3.org/Style/Examples/007/text-shadow.en.html

see this link may help

it adds text shadow to letters if you dont want feather then keep value to 0px will give you border around text

Upvotes: 0

EyasSH
EyasSH

Reputation: 3779

For a 1 pixel stroke, text-shadow would do:

text-shadow: 0 0 1px black;

Upvotes: 3

Matheus
Matheus

Reputation: 839

Using

You can only use text-stroke on webkit browsers (Chrome, safari, etc)

Source: caniuse.com

But like other poeple answered, you can use text-shadow instead

p {    
    text-shadow: 0 0 1px black;
}

FIDDLE

Upvotes: 1

Related Questions