Script Tips


NetBizCity - Script Tips
Saturday, 07 October 2006 23:10

Placing Text on a Picture

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

Published in HTML