Click here to Skip to main content
16,010,257 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
how to insert a text in a image.
Posted

 
Share this answer
 
create
C#
2 <div></div>
on your site,
one would be for the image, and one for the text.

Let's start by creating a div to hold the picture

C#
<div id="pictureHolder"></div>


next, we will create a div for our text

C#
<div id="myText">Text goes here</div>



now, we combine the two divs (you will use this one)

C#
<div id="pictureHolder">
<div id="myText"></div>
</div>


notice that I have placed the text div inside the picture div, in this way, we can type anything we want in our image.

the final step is to set your picture as the background of the picture holder so we can type any text on it.

we will use css for this

C#
#pictureHolder
{
background-image: (yourimage'slink);
}


then that's it you may now type anything on your image..

-JB
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900