dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Shadow

  1. #1
    Join Date
    May 2007
    Location
    Sweden
    Posts
    123

    Shadow

    Hey

    Does any1 know how to make a simple nice shadow to a <font>-element?
    The shadow should be: 2px down, 2px left and black...

    Thanks for help!
    //Christoffer

  2. #2
    Join Date
    Nov 2002
    Posts
    4,473
    You might want to ask that on the CSS forum.

  3. #3
    Join Date
    Oct 2007
    Posts
    106
    Yeah, CSS is what you want. CSS3 specifies a text-shadow property (http://www.w3.org/TR/2003/CR-css3-te.../#text-shadows) but browser support is pretty poor at this time.

    The following works in (the latest PC based) Firefox, Safari and Opera but NOT in IE 6. Don't have access to a Mac here at work.

    <html>
    <head>

    <style type="text/css">
    .shadow { position:relative; display:block; color:#fff; }
    .shadow span { position:absolute; display:block; top:0px; }
    .shadow:before { display:block; padding:1px; content: attr(title); color:#666; }
    </style>

    </head>
    <body>


    <p class="shadow" title="This is white text, on a white background. Yet with CSS Drop Shadows, you can read this, because of the black text-shadow."><span>This is white text, on a white background. Yet with CSS Drop Shadows, you can read this, because of the black text-shadow.</span></p>

    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles