Jump to content

Archived

This topic is now archived and is closed to further replies.

lanny

Help!!loading text on image

Recommended Posts

I'm currently developing an online shirt design website for my coll project...

i'm using xhtml layout and php, to load the user input text, where the text willl be display on center of the tshirt picture.
the text can be display on the xhtml page, but cant adjust to be display on the middle of the image...any solutions for displaying text on an image file?



my xhtml code :
<tr>

<td width="197" height="219"><div align="center"></td>
<td width="197" height="219"><div align="center">
<img src="Images/shirt_grey.jpg" width="240" height="240" /></div>
<?php
if ($_POST['submit'] == "Submit")
{
echo " " . $_POST["usertext"] . "<br/>";
}
?></td>



Thanks in advance!

Share this post


Link to post
Share on other sites
[ol type=\'1\'][*]Create a PHP-generated image[*]Make the t-shirt the background of a div the size of your t-shirt image, then use padding and margins to set it to go where you want it to go[/ol]

Share this post


Link to post
Share on other sites
Is there any link on learning how to generate image in php?

Thanks in advance

Share this post


Link to post
Share on other sites
beside creating php generated image, is there any other solutions?.because i cant install the GD library in php.

Share this post


Link to post
Share on other sites
Another solution? Sure, this one:
[!--quoteo(post=362306:date=Apr 6 2006, 02:14 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Apr 6 2006, 02:14 PM) [snapback]362306[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Make the t-shirt the background of a div the size of your t-shirt image, then use padding and margins to set it to go where you want it to go[/quote]

Share this post


Link to post
Share on other sites
i dont really understand the solution above, can u please explain more?
thanks in advance

Share this post


Link to post
Share on other sites
Do you know CSS? If you do, then just use CSS positioning to put a <div> tag with your text on it over the shirt.

Share this post


Link to post
Share on other sites
[!--quoteo(post=367505:date=Apr 22 2006, 01:42 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Apr 22 2006, 01:42 PM) [snapback]367505[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Do you know CSS? If you do, then just use CSS positioning to put a <div> tag with your text on it over the shirt.
[/quote]

i dont know CSS...is there any tutorial for creating this?

Share this post


Link to post
Share on other sites
i went through a tutorial and found out the code
" <DIV style="position: absolute; top:511px; left:428px; width:94px; height:24px">text</DIV>"

now, the text can be placed on the shirt...but how to code, if i wanna let user add the text by entering the text on input box, then click on submit button..the text will displayed on shirt.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.