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

Thread: Text over image.

Hybrid View

  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
    Jun 2004
    Location
    England
    Posts
    2,972
    Quote Originally Posted by aangavatar101
    Make the image the background!
    Now you see, I said that my first post, but does anyone listen? Oh no!
    Quote Originally Posted by aangavatar101
    <body background="file">
    Not like that, it's outdated and will just fill the document with a damned repeating image.
    Quote Originally Posted by aangavatar101
    or just edit the image and add words to it then!
    That will be inconvenient for you and bring up accessability issues.
    Quote Originally Posted by aangavatar101
    Is someone going to post something?
    Yes, you apparently.
    Quote Originally Posted by aangavatar101
    (There is someone on this thread!) Get a username kid!
    There's always a load of guests browsing the forum, deciding whether they can be bothered to join, somehow, I don't think you're encouraging them.
    Quote Originally Posted by Thunderstorm387
    Yeah...a blog is a way to put text over an image.
    I really do hope that you're being sarcastic there.
    Quote Originally Posted by Thunderstorm387
    Or maybe get paint or something...and just edit the picture and add the text on.
    Still hoping that you're being sarcastic. What have people got against my sollutions?!
    Quote Originally Posted by aangavatar101
    Umm... Are you still on Thunder...
    You can tell when people are online by the little light next to thier usernames.
    Quote Originally Posted by aangavatar101
    My sister is a teen and she has everything!?! Wait?!? Did you post a thread?!?
    You see, now we've transgressed into complete nonsense. No-one cares about your sister.
    Quote Originally Posted by thunderstorm387
    I wonder if this on this forum...are we actually allowed to post general chat messages?
    Well not really, I just hope that the OP hasn't got too confused by you two.
    Quote Originally Posted by thunderstorm387
    I am still having trouble with anchors.
    That's nice, re-read the relevant specifications and then if you're still having trouble, post a thread about it.

  7. #7
    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 05:34 PM. Reason: He left

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

  9. #9
    Join Date
    Jun 2006
    Location
    Earth
    Posts
    25
    Perhaps a blog...

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

    Me?

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

    (Sorry)

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

  13. #13
    Join Date
    Jun 2006
    Location
    Earth
    Posts
    25
    Well I am a kid...>_<
    thunderstorm387 is a username...O_o

  14. #14
    Join Date
    May 2006
    Posts
    43

    Kid?!?

    Hello

  15. #15
    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.

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