Results 1 to 5 of 5

Thread: HTML script question
      
   

  1. #1
    doug145 is offline Sergeant First Class
    Join Date
    Sep 2006
    Posts
    51

    Default HTML script question

    Anyone:

    When I paste this code into an HTML box and run it in the browser, it wants to center the text. I want it to be left-justified. How can I make what is displayed left justified in the box instead of it being centered?


    <form name=myForm>
    <input type=button value="Loading..." name=clock></form>
    <SCRIPT LANGUAGE="JavaScript"><!--
    function runClock(){
    theTime = window.setTimeout("runClock()", 1000);
    d = new Date();
    day = d.getDay();
    mon = d.getMonth();
    date = d.getDate();
    year = d.getYear();
    hr = d.getHours();
    min = d.getMinutes();
    sec = d.getSeconds();
    if(year<1000){year=(""+(year+11900)).substring(1,5 );}
    else{year=(""+(year+10000)).substring(1,5);}
    if(hr==0){ap=" AM";hr=12}
    else if(hr <= 11){ap=" AM"}
    else if(hr == 12){ap=" PM";hr=12}
    else if(hr >= 13){ap=" PM";hr-=12}
    if(min <= 9){min="0"+min}
    if(sec <= 9){sec="0"+sec}
    zday=new Array();
    zday=["Sunday","Monday","Tuesday","Wednesday","Thurs day" ,"Friday","Saturday"];
    zmon=new Array();
    zmon=["January","February","March","April","May","Ju ne", "July","August","September","October","Novembe r"," December"];
    document.myForm.clock.value=""+zday[day]+", "+zmon[mon]+" "+date+", "+year+" "+hr+":"+min+":"+sec+ap+"";}
    runClock();
    //--></script>

  2. #2
    mrmagoo144's Avatar
    mrmagoo144 is offline Brigadier General
    Join Date
    Feb 2007
    Posts
    1,369

    Default Re: HTML script question

    just place it in the html box and put the box where you want it to display, left - center - right.
    here is your code left justified:
    http://videopostcards.info/html.html

  3. #3
    doug145 is offline Sergeant First Class
    Join Date
    Sep 2006
    Posts
    51

    Default Re: HTML script question

    Quote Originally Posted by mrmagoo144 View Post
    just place it in the html box and put the box where you want it to display, left - center - right.
    here is your code left justified:
    http://videopostcards.info/html.html

    I am trying to eliminate the white space on the left and right side of what is displayed in the box, in order to give me more space on my page, as I am putting items to the left and right of it. How can I do that? When I just compress the box it seems to do no good.

  4. #4
    zuriatman's Avatar
    zuriatman is offline Moderator
    Join Date
    Sep 2006
    Location
    Malaysia
    Posts
    3,039

    Default Re: HTML script question

    Quote Originally Posted by doug145 View Post
    I am trying to eliminate the white space on the left and right side of what is displayed in the box, in order to give me more space on my page, as I am putting items to the left and right of it. How can I do that? When I just compress the box it seems to do no good.

    Place your html box inside a shape or Iframe.

    sample page.................
    www.siapamoyanganda.com/
    Malaysian Family Tree Website From the
    State of Johor.

    HAPPY ARE THOSE WHO DREAM DREAMS AND ARE READY TO PAY THE PRICE TO MAKE THEM COME TRUE.

  5. #5
    wysiwyg4 is offline Major
    Join Date
    Nov 2007
    Posts
    481

    Default Re: HTML script question

    You probably could use this:

    <input style="padding: 2px 2px 2px 2px; .............

    padding runs as top right bottom left.

    Adjust padding to your liking.

Thread Information

Users Browsing this Thread

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

     

Posting Permissions

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

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