Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Java Script - how to center a text in a form

Posted on 2003-12-05
Medium Priority
Last Modified: 2010-04-17
My URL is

I have a clock on the top.  The time is on the left side.  I want to center it,  or make the form smaller, or not to have the form.

If you need my script, or form, I will post them here.

Thank you
Question by:wzhu58
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 10

Expert Comment

ID: 9884034
Just make the boder of the input 0 so you wont see it.

<input type="text" name="clock" style="border:0">

This way all you see is the clock.

Hope this helps...


Author Comment

ID: 9884122
Thank you D_M_D.

Would you please also tell me how to center the text and change the size of the form?

LVL 10

Expert Comment

ID: 9884218
Please post the code for your top frame - upper_frame.htm

LVL 10

Accepted Solution

D_M_D earned 500 total points
ID: 9884354
Here you go.  Is this what your looking for...

Just replace the body code in your upper_frame.htm file with this...

<BODY leftMargin=0 topMargin=0 onload=writeTime() MARGINHEIGHT="0"
<form name="the_form">
<TABLE width="60%" border="0" bgColor=#ffffff height="19">
    <TD vAlign=top align=middle width="35%">
      <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">
      <A href="" target=_top><B><FONT
      face=Arial color=#544c4c size=4></FONT></B></A></p>
    <TD vAlign=top align=middle width="40%"><FONT face=Arial
      color=#000000 size=2>
            document.write( dayName[now.getDay()] + " ,  " + monName[now.getMonth()] +"  " + now.getDate() + "  " + now.getFullYear())
        <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><INPUT
name=the_text size="8" style="border:0"></FONT></TD></TR></TBODY></TABLE></form></center></BODY>

I added a size to the form so the time would look nicer.


Author Comment

ID: 9891851
Hello D_M_D,

It works very well. Thank you.

How you know my html is name upper_frame?  I didn't give you my file name.



Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question