How Do I Put Text In Front Of Images?

Discussion in 'HTML & Website Design' started by aaronlamont1, Jun 12, 2009.

  1. #1
    I am having some trouble trying to figure out how to put text on top of an image.

    Now the obvious might be for me to use a paint program and then edit the words onto the picture that way but I want to add text for links and also add text on top of other pictures that I want to use throughout my website.

    Its basic html I am using.

    Can someone help in suggesting a way to do this if it can actually be done,

    Many thanks in advance,

    Aaron.
     
    aaronlamont1, Jun 12, 2009 IP
  2. Abu_Ali

    Abu_Ali Active Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    93
    #2
    Make a table and put the image as a background image, then you can write whatever you want in the table cell above the image.
     
    Abu_Ali, Jun 12, 2009 IP
  3. pmp123

    pmp123 Member

    Messages:
    219
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    just define image as background. now you can write over it..
     
    pmp123, Jun 12, 2009 IP
  4. indigochild

    indigochild Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Define a div class with image in background for in CSS. E.g.:

    div.bg {
    	background-attachment: scroll;
    	background-image: url(/img/bg.gif);
    	background-repeat: repeat-x;
    	background-position: left top;
    ...
    }
    Code (markup):
    and then use this div in your html
    
    <div class="bg">Text goes here</div>
    HTML:
     
    indigochild, Jun 12, 2009 IP
  5. indigochild

    indigochild Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've never tried this. :rolleyes:
     
    indigochild, Jun 13, 2009 IP