www.webdeveloper.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 38

Thread: Text over image.

  1. #1
    Join Date
    May 2006
    Posts
    3

    Text over image.

    I'm new to HTML, and I was wondering how to make text go over images.

    I instert the image <img src="url"> and center it, then write text and center it and it appears underneath.

    I have tried putting the image and text in a table but that still doesn't work.

    Please help >?

  2. #2
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    If you're sure you want text "over" an image:
    HTML Code:
    <img src="images/image.png" alt="alternate text" style="width: 200px; height: 200px; display: block;">
    <p stlye="width: 200px; position: relative; top: -200px;">text</p>
    Or if you'd rather a background image:
    HTML Code:
    <div style="width: 250px; background: url(images/background.png) no-repeat center center;">
    <p>text</p>
    </div>

  3. #3
    Join Date
    May 2006
    Posts
    3
    The text still appears underneath the image.
    Am I suppose to edit a part of that first code besides the image url and the text?

  4. #4
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Hmm, I really hadn't expected you to go for the first one so I hadn't checked it, but o.k.
    Both elements need to be "relatively" positioned.
    Code:
    <img src="images/image.png" alt="alternate text"
    style="width: 200px; height: 200px; display: block; position: relative; top: 100px;">
    <p stlye="width: 200px; position: relative; top: -100px;">text</p>

  5. #5
    Join Date
    May 2006
    Posts
    43
    Make the image the background!

    <body background="file">

    or just edit the image and add words to it then!
    (Im not trying to be mean)

  6. #6
    Join Date
    May 2006
    Posts
    43
    Is someone going to post something?!? (There is someone on this thread!) Get a username kid! or teen or whatever!
    Last edited by aangavatar101; 06-04-2006 at 04:34 PM. Reason: He left

  7. #7
    Join Date
    May 2006
    Posts
    43
    Now there is someone that can post something!

  8. #8
    Join Date
    Jun 2006
    Location
    Earth
    Posts
    25
    Perhaps a blog...
    I'm new here...

  9. #9
    Join Date
    Jun 2006
    Location
    Earth
    Posts
    25
    "Get a username kid! or teen or whatever!"

    Me?
    I'm new here...

  10. #10
    Join Date
    May 2006
    Posts
    43
    Matbe not!!!

    (Sorry)

  11. #11
    Join Date
    May 2006
    Posts
    43
    No before you there was someone!

  12. #12
    Join Date
    Jun 2006
    Location
    Earth
    Posts
    25
    Well I am a kid...>_<
    thunderstorm387 is a username...O_o
    I'm new here...

  13. #13
    Join Date
    May 2006
    Posts
    43

    Kid?!?

    Hello

  14. #14
    Join Date
    Jun 2006
    Location
    Earth
    Posts
    25
    Ok never mind.

    Yeah...a blog is a way to put text over an image.

    Or maybe get paint or something...and just edit the picture and add the text on.
    I'm new here...

  15. #15
    Join Date
    May 2006
    Posts
    43
    >_<
    I just want to learn HTML O_o

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