[HTML] Type in a pic

Newbie Spellweaver
Joined
Nov 19, 2008
Messages
50
Reaction score
2
Why my code dont wants to work?, i wants the "online" he be typed in my pic.


Code:
<INPUT
     TYPE=IMAGE 
     SRC="serverstatus.bmp"
     ALT="online" ALIGN=ABSMIDDLE
     >
</FORM>
 
I don't quite understand what your trying to do?
Are you trying to get the writing on the image? if so, i recommend using an image editor.
If your trying to get an alternative text (when you hover over the image, text appears), it should be done like so;

Code:
<img src="your image location here" alt="text to be displayed, here">
 
Thanks but, still don't works the text it behind the pic :(


Code:
<img src="serverstatus.bmp" alt="<font color='white'>lol</font>">
 
You may also be thinking of GD in PHP which you can generate images or text on to images, you can find one resource here.
But it'll probably be easier & faster if you do it via the method above eg.

Code:
#status{width:XXXpx;height:YYYpx;background-image:url('serverstatus.bmp');background-repeat:no-repeat;
Then in the PHP aspect of it you could do
PHP:
echo '<b style="color:red;">Offline</b>';
or if it's online you could do
PHP:
echo '<b style="color:green;">Online</b>';
You just need to go learn how to actually make the status script.

Also the 'alt' in HTML is an alternative if the image doesn't load it'll show the text, so it won't show both.
 
Last edited:
alt is just an alternative text, like when the link is broken or picture won't load, it'll use alt, anyway EliteGM's way is kind of right, but actually it's should be
PHP:
<div style="background: url(/images/serverstatus.bmp);">My text... It's on the image?!</div>
and you definitely shouldn't use bitmaps, png or jpeg is just fine, anyway if you'd still want to use image another way would be

PHP:
//css
#wrap {
 position: relative;
}
#wrap img {
 display: block;
 position: absolute
 top: 0;
 left: 0;
}

//html
<div id="wrap">
 <img src="/images/serverstatus.bmp" alt="" />
 <span>O hai this is text</span>
</div>
 
guys plz stop helping this person.

he doesnt want to take the time to learn at least a little of whatever he is trying to do.

if you notice allot of his threads are help threads and they are simple answered questions at most, so plz just tell him a site to goto to learn the material he trying to make. *try to find one that you have to read to understand
 
guys plz stop helping this person.

he doesnt want to take the time to learn at least a little of whatever he is trying to do.

if you notice allot of his threads are help threads and they are simple answered questions at most, so plz just tell him a site to goto to learn the material he trying to make. *try to find one that you have to read to understand

QFT.

All he does is make threads and not try to solve them.
 
Back