Script Tips


Sunday, 08 October 2006 03:10

Placing Text on a Picture

Written by 
Rate this item
(0 votes)

Placing Text on a Picture

One method we can use is using a table with the picture as the background

 

We can set the background for the column
and place the text within the TD tag as normal
<td background="mars_lander.gif" width="231" height="265" align="center" nowrap>
<h1><font color="yellow">Is there Life on Mars?</font></h1></td>

Is there Life

on Mars?

 

Another method we can use is using position or layers

For this example We will use the div tag
<div class="div_set"><br><br>Is there Life<br>on Mars?</div>

For the Style we have the following:

<STYLE>
     .div_set {z-index:1; background-image: url(mars_lander.gif);
     font-size:34; font-weight:bold; text-Align:center;
     color: yellow; position:relative; width: 231; height:265;}
</STYLE>
 

 

Is there Life

on Mars?

In both cases to avoid repeating the image use background-repeat:no-repeat

Vincent Gabriele

Read 4964 times Last modified on Sunday, 26 April 2015 00:55

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

 

 

Script Tips Search

Registered User