Results 1 to 7 of 7

Thread: Text on IMG

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Text on IMG

    Ok, I have an image inside of a DIV and I want text to show up on TOP of the image without having ANOTHER DIV inside.

    So in pCode it looks kind of like this.
    Code:
    <DIV>
    <IMG HERE>
    <TEXT>
    </DIV>
    How do I make the text appear on the image, and image on div?
    Is there a DIV Background or something?
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You can use style:

    Code:
    <div style="background-image:url('image.png'); background-repeat:no-repeat;">
      Some Text
    </div>

  3. #3

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    That seems to work but gives me strange results. Since i have
    1 BIG DIV

    <DIV> with smaller ones iniside
    <DIV></DIV>
    <DIV></DIV>
    </DIV>

    These act as a drop down menu. Now, their size and position varies coorespondong to some parameters so their usually 2 pixels or so appart. Each child div has also <FONT>Text</FONT> on it to show a menu command.

    _________
    MENU DIV
    _________
    DIV1
    _________
    xxxxxxx
    _________
    DIV 2
    _________
    xxxxxxx
    _________
    END MENU DIV
    _________

    The xxxx's indicate a space between the children div.
    MENU DIV

    When I use the background, the button image shows up but takes out the spaces. This is bizzar!
    The <FONT> Stays in the right place, meaning each <FONT>Menu Text</FONT> stayes where it should, with spaces.. but the div pictures form 1 big picture without spaces.
    _________
    MENU DIV
    _________
    DIV1
    _________
    DIV 2
    _________
    END MENU DIV
    _________

    Why does this happen?
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  4. #4

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    ...wait, nm that last post.
    I was putting in <IMG SRC="file"> in there for some reason, and that was what was acting so bizzar! But now it wont even show up. ***?
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  5. #5
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Can you post/upload the code you're using?

  6. #6

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    I got it working. Thanks for the help anyway... I was using a wrong ", should of been using '...

    anyhow, I appriciate the help. Thanks alot.

    InVitro
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width