How to add a drop shadow to CSS text?

Discussion in 'CSS' started by misohoni, Mar 16, 2008.

  1. #1
    I've seen tutorials for adding shadows to boxes etc.,, but how to add a shadow on stylised text?
     
    misohoni, Mar 16, 2008 IP
  2. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #2
    There are a few way to achieve this:

    1/ Use images or image replacement.
    2/ Use CSS3's att: text-shadow (at the moment of speaking, works on webkit/Safari and Opera 9.5)
    3/ Use 2 layers of text positioning inside a container.
    4/ Others (flash,JS...)
     
    VimF, Mar 16, 2008 IP
  3. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #3
    Thanks for the breakdown. I'm using Image Replacement, but also a bit of 2/ also since whatever is typed, then the relevant Image using TTF is displayed...but would like a shadow on the text.

    Would you know how this is possible?
     
    misohoni, Mar 16, 2008 IP
  4. chapicha

    chapicha Peon

    Messages:
    235
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    chapicha, Mar 16, 2008 IP
  5. 2ct7

    2ct7 Peon

    Messages:
    245
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes like that. Can it be done with css? Does this look like regular text to a bot for serps?
     
    2ct7, May 6, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Go to that page, and click View, Page Source in your browser. You will see the text simply repeated twice.
    
    <div id="divheading">
    <h1>TaLayOnline</h1>
    </div>
    <div id="divheading_shadow">
    <h2>TaLayOnline</h2>
    </div>
    <br>
    <div id="divheading2">
    <h3>The online marketplace for download ebooks, software, and digitally delivered products.</h3>
    </div>
    <div id="divheading_shadow2">
    <h4>The online marketplace for download ebooks, software, and digitally delivered products.</h4>
    
    </div>
    
    Code (markup):
    This will look strange or sound strange to those not using visual browsers, but won't hurt as far as teh googles are concerned. It's just the same text twice with the second one positioned over the first, but a little offset. One text is black, the other white. That is what you can do with css.
     
    Stomme poes, May 7, 2008 IP