Results 1 to 12 of 12

Thread: How to make this date center

  1. #1
    Join Date
    Jan 2004
    Location
    United Kingdom
    Posts
    2
    Rep Power
    0

    Unhappy How to make this date center

    Hi guys...can somebody help me please...how to make this date center and move little bit down from its original position...at this moment it appears on the left side of my homepage..it can be viewed at this site:

    www.geocities.com/mdaidi/index.html

    actually i copied this html code from dynamicdrive.com..

    Body tag script

    <body onLoad="goforit()">


    body script

    <script>

    /*
    Live Date Script-
    © Dynamic Drive (www.dynamicdrive.com)
    For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
    visit http://www.dynamicdrive.com
    */


    var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday")
    var montharray=new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","December")

    function getthedate(){
    var mydate=new Date()
    var year=mydate.getYear()
    if (year < 1000)
    year+=1900
    var day=mydate.getDay()
    var month=mydate.getMonth()
    var daym=mydate.getDate()
    if (daym<10)
    daym="0"+daym
    var hours=mydate.getHours()
    var minutes=mydate.getMinutes()
    var seconds=mydate.getSeconds()
    var dn="AM"
    if (hours>=12)
    dn="PM"
    if (hours>12){
    hours=hours-12
    }
    if (hours==0)
    hours=12
    if (minutes<=9)
    minutes="0"+minutes
    if (seconds<=9)
    seconds="0"+seconds
    //change font size here
    var cdate="<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
    +"</b></font></small>"
    if (document.all)
    document.all.clock.innerHTML=cdate
    else if (document.getElementById)
    document.getElementById("clock").innerHTML=cdate
    else
    document.write(cdate)
    }
    if (!document.all&&!document.getElementById)
    getthedate()
    function goforit(){
    if (document.all||document.getElementById)
    setInterval("getthedate()",1000)
    }

    </script>
    <span id="clock"></span>

    so can anybody tell me how to adjust it...my background is purely accounting...

    thank you..
    Last edited by kampungboy; 07-01-2004 at 05:55 PM.

  2. #2
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    227
    Hi,

    Easiest way to do it is by changing:

    Code:
    var cdate="<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
    +"</b></font></small>"
    to

    Code:
    var cdate="<center><small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
    +"</b></font></small></center>"

  3. #3
    Join Date
    Jan 2002
    Location
    SoObHanG JhaYa
    Posts
    501
    Rep Power
    225
    also, you can use :

    <div align="center">Your code</div>
    instead of

    <center>Your code</center>
    <form name="jump">
    <select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" style="border:1px #393F31 solid;color:#393F31;font:10px Verdana;font-weight:bold;" >
    <option value="0" style="background: #9CC8FE" selected>*SELECT-LINKS</option>
    <option value="http://www.gengturbo.org/" style="background: #FF0000">GENGTURBO</option>
    <option value="http://www.phixelgrafix.com/" target="new" style="background: #C6D607">PHIXELGRAFIX</option>
    <option value="http://dailydigital.phixelgrafix.com/" style="background: #FCBC45">OLD-BLOG</option>
    <option value="http://www.mesrahosting.net/" style="background: #FF99CC">WEBHOSTING</option>
    </select>
    </form>

  4. #4
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    213
    2 working and functional solutions for you... understand it, and use it right!

    p/s: it looks like that you have missed the tiny part of HTML that do the BIG part of layout and design... over-looked, heh?

  5. #5
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    tuh laa..
    suruh belajar HTML tak mau.
    kan dah susah.. huhuhu
    :mode-kejam-mula:

    soooo.. STUDY THE ROOT! .. la la laaa

  6. #6
    Join Date
    Jan 2003
    Location
    dreamland
    Posts
    240
    Rep Power
    207
    Originally posted by mysticmind
    tuh laa..
    suruh belajar HTML tak mau.
    kan dah susah.. huhuhu
    :mode-kejam-mula:

    soooo.. STUDY THE ROOT! .. la la laaa
    skali lagi..

    btul tuh kater abang mysticmind..

    blaja html dulu...
    blaja basic dulu...

    huahhahrhahhahgh
    ^_^ <== stay happy

  7. #7
    Join Date
    Jan 2002
    Location
    SoObHanG JhaYa
    Posts
    501
    Rep Power
    225
    hohoho.... teringat masa mula2 blaja html... kena buat tables guna notepad.... arghhhh...... tapi takpe.... terima kasih netscape composer!!!!
    <form name="jump">
    <select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" style="border:1px #393F31 solid;color:#393F31;font:10px Verdana;font-weight:bold;" >
    <option value="0" style="background: #9CC8FE" selected>*SELECT-LINKS</option>
    <option value="http://www.gengturbo.org/" style="background: #FF0000">GENGTURBO</option>
    <option value="http://www.phixelgrafix.com/" target="new" style="background: #C6D607">PHIXELGRAFIX</option>
    <option value="http://dailydigital.phixelgrafix.com/" style="background: #FCBC45">OLD-BLOG</option>
    <option value="http://www.mesrahosting.net/" style="background: #FF99CC">WEBHOSTING</option>
    </select>
    </form>

  8. #8
    Join Date
    Jun 2003
    Location
    Papar, Sabah
    Posts
    266
    Rep Power
    203
    keh! keh! keh! ni mesti pasal mata dah buta ngan semua javascript yg ada.. semua nak interaktif je.. biasala tu, zaman freashie... dpt buat rollover pun dah kembang hidung!

  9. #9
    Join Date
    Jan 2003
    Location
    dreamland
    Posts
    240
    Rep Power
    207
    hahahahhaa...
    btul 2...

    ader freeshies tu.. baru tau skit... blagak dier mcm hustler php jer..

    aper2 pun...
    jangan malu bertanya kalau tak tau...

    biar tanya soalan bodoh..
    tp paham aper benda yg kiter tanya tuh...
    daripada tak tau, pastu malu nak btanya...
    pastu berlagak cam tau...

    hahahhahaha....
    ^_^ <== stay happy

  10. #10
    Join Date
    Jun 2003
    Location
    Papar, Sabah
    Posts
    266
    Rep Power
    203
    heheheh! aku menyampah sangat ngan org gitu! baru je belajar, dah nak belagak show-off hasil dia.. sekali kritik terus melenting.. ceh! camana nak maju..?

  11. #11
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    aku ingat dulu masa aku belajar HTML..
    ada tag < blink> </blink>

    jadikan teks berkelip˛ kat netscape.. kat ie tak valid.
    skang tag tuh tah laku ke tak tak tau..

    pehtuh buat <marquee> ek eleh... rasa cam best jer bila paham guna tag tuh.. wakakakaka

    tak kisah la walau apapun pengalaman korang dengan HTML.. yang penting studylah HTML.

  12. #12
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    213
    ha ha ha.... aku ingat aku sorang je memula terpegun dek blink dgn marquee ni...

    blink dah deprecated dah... tag zaman jepun punya tu
    marquee still working, tapi x digalakkan (buruk & nampak x pro)
    kalau utk demo & syok2, bole la try atribut2 marquee yg lain tu kasik power mcm scrolldelay, scrollamount, behavior bgcolor dll...

    namun yg paling x dilupakan ialah anti-right click script... inilah benda yg mendorong aku utk kenal & belajar HTML & _Javascript, siap ada collection dr script tahap bodo sampai tahap power! Flash pun ada AS utk script mcm ni jugak kan, ke amik dr JS?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Looking for Call center
    By sunilgohin in forum Free Hosting Discussion Forum
    Replies: 0
    Last Post: 14-08-2009, 07:01 PM
  2. between 2 date
    By meiji in forum Website Programming
    Replies: 2
    Last Post: 29-04-2005, 09:44 AM
  3. Date question
    By ngaisteve1 in forum Website Programming
    Replies: 0
    Last Post: 11-04-2004, 09:07 PM
  4. auto date
    By redzwan7 in forum Website Design
    Replies: 0
    Last Post: 10-07-2003, 03:13 PM
  5. make ur site dynamic, up to date and informative
    By zumaidi in forum Other Internet Marketing Methods
    Replies: 1
    Last Post: 04-05-2003, 01:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112