Jump to content


Photo

Help!!loading text on image


  • Please log in to reply
9 replies to this topic

#1 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 06 April 2006 - 03:28 PM

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!

#2 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 06 April 2006 - 06:14 PM

[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]
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#3 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 08 April 2006 - 08:25 AM

Is there any link on learning how to generate image in php?

Thanks in advance

#4 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 22 April 2006 - 02:55 PM

beside creating php generated image, is there any other solutions?.because i cant install the GD library in php.

#5 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 22 April 2006 - 03:00 PM

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) View Post[/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]

Legend has it that reading the manual never killed anyone.
My site

#6 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 22 April 2006 - 06:24 PM

i dont really understand the solution above, can u please explain more?
thanks in advance

#7 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 22 April 2006 - 06:42 PM

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.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#8 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 23 April 2006 - 03:42 AM

[!--quoteo(post=367505:date=Apr 22 2006, 01:42 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Apr 22 2006, 01:42 PM) View Post[/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?

#9 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 23 April 2006 - 04:08 AM

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.

#10 lanny

lanny
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 23 April 2006 - 04:20 AM

i got the problem solved!..thanks everyone!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users