Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS "sunken"/"inset" letter effect without using image

Tags:

text

css

How is the "sunken" or "inset" effect applied to these letters in this menu? I looked (briefly) with Firebug but can't find how they're doing it. Works in FF, not in IE.

alt text

See http://balsamiq.com/products/mockups/mybalsamiq for actual example.

like image 933
Ben Avatar asked Sep 01 '26 07:09

Ben


2 Answers

This is just a Text Shadow with a color lighter than the background instead of darker, causing it to look like a bevel. (We've been trained to believe that the 'sunlight' on a computer screen generally comes from the upper left corner.)

The CSS rule shown when using the Developer Tools for Safari shows:

text-shadow: white 0px 1px 0px;
like image 112
Phrogz Avatar answered Sep 03 '26 21:09

Phrogz


That is most likely a text-shadow:

p {
    text-shadow: 0 1px 0 #fff;
}

No version of IE in existence (not even IE9 beta) supports text-shadow.

like image 29
BoltClock Avatar answered Sep 03 '26 21:09

BoltClock