#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    2
    Rep Power
    0

    position a time/date javascript on a page


    i want to add a time/date javascript over a jpg image on a webpage, and have it permanently stay in that position (absolute?)...i know practically nothing about css but can get thru html and adding javascripts with no problem...i already have the time/daye script, just need help getting it positioned...any help is appreciated...mdh
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Canberra, Australia
    Posts
    348
    Rep Power
    13
    <div id="myDate">

    <insert script here

    </div>

    Now the css is

    #myDate {
    position: absolute;
    top: *px;
    left: *px;
    font-size: *pt;
    color: #******;
    }

    This will place the div with the ID of myDate to the top and Left position you set. This will not work if you have a scaling site. For that you need a bit more complicated CSS. But this should suit fine.

    the font-size and color is for the Date value.

IMN logo majestic logo threadwatch logo seochat tools logo