lanny Posted April 6, 2006 Share Posted April 6, 2006 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><?phpif ($_POST['submit'] == "Submit"){echo " " . $_POST["usertext"] . "<br/>";}?></td> Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/ Share on other sites More sharing options...
moberemk Posted April 6, 2006 Share Posted April 6, 2006 [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] Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-24539 Share on other sites More sharing options...
lanny Posted April 8, 2006 Author Share Posted April 8, 2006 Is there any link on learning how to generate image in php?Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-24975 Share on other sites More sharing options...
lanny Posted April 22, 2006 Author Share Posted April 22, 2006 beside creating php generated image, is there any other solutions?.because i cant install the GD library in php. Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29590 Share on other sites More sharing options...
AndyB Posted April 22, 2006 Share Posted April 22, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29592 Share on other sites More sharing options...
lanny Posted April 22, 2006 Author Share Posted April 22, 2006 i dont really understand the solution above, can u please explain more?thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29637 Share on other sites More sharing options...
moberemk Posted April 22, 2006 Share Posted April 22, 2006 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 Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29639 Share on other sites More sharing options...
lanny Posted April 23, 2006 Author Share Posted April 23, 2006 [!--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? Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29731 Share on other sites More sharing options...
lanny Posted April 23, 2006 Author Share Posted April 23, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29740 Share on other sites More sharing options...
lanny Posted April 23, 2006 Author Share Posted April 23, 2006 i got the problem solved!..thanks everyone! Quote Link to comment https://forums.phpfreaks.com/topic/6735-helploading-text-on-image/#findComment-29741 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.