Click to See Complete Forum and Search --> : Text on Top???


SFTR
01-10-2004, 07:03 AM
Second Question in post 4 i think!

Hiya

Im new to HTML and I'm stuck.
I've used this to place an image and then place the date over the top but it draws the text underneath:


<div id="Layer1" style="position:absolute; left:690px; top:0px; width:73px; height:76px; z-index:1">
<IMG SRC="Box_Small.gif">
<SCRIPT LANGUAGE="JavaScript">
MyDate = new Date();
document.write("The date is:" + (MyDate.getMonth()+1) + "/" + MyDate.getDate() + "/" + MyDate.getFullYear() + ". Enjoy!");
</SCRIPT>
</div>

Is there any way to prevent the image going over the top of the text!

Thx

iniquity101
01-10-2004, 07:26 AM
this might help (http://forums.webdeveloper.com/showthread.php?s=&threadid=21801&highlight=text+over+images)

Fang
01-10-2004, 07:36 AM
Or wrap the text with: <span style="position:absolute;top:0px; left:0px;">

SFTR
01-10-2004, 08:32 AM
YAY!!!!

Thx!

But oh no! Another problem!

What is the JavaScript equivalent of a Space and a Line Break.
You see, the Box_Small.gif is a picture of a box but when the date is drawn in the box it goes over the outline of the box. I need to be able to center the date in the box.

Can anyone help this problem!

Thx!