How to put text on this image?

Discussion in 'CSS' started by chrisj, Sep 3, 2010.

  1. #1
    What code is needed so that this image is the background and so I can put text on it? Thanks.


    <img src=".../images/box2.gif" border="0" />
    Code (markup):

     
    chrisj, Sep 3, 2010 IP
  2. lostdesign39

    lostdesign39 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you need to create a css block with that image as the background

    html:
    <div id="imagecontainer">
    <p>text here</p>
    </div>


    css:

    #imagecontainer{
    background: transparent url("../images/box2.gif") no-repeat scroll 0 0 transparent;
    }
     
    lostdesign39, Sep 3, 2010 IP
  3. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #3
    best reffered by lostdesign39.

    a tricky one using z-index.
     
    radiant_luv, Sep 3, 2010 IP