Script Tips

Saturday, 07 October 2006 23: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:

     .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;}


Is there Life

on Mars?

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

Vincent Gabriele

Read 7487 times Last modified on Saturday, 25 April 2015 20:55

Leave a comment

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