SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    NY
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Text Input Field Size

    I have create a form on my website.

    Everything looks fine from my server. The text input fields are all in the right size and everything is aligned correctly.

    However, when I open the form from my other computer, I see things differently, the text input fields are not all in the same size. Some of them longer than others.

    The font type on the command button looks weird too.

    Here is a part of the form:
    <Form Name="PostMessage" Form Action = "Post.asp" Method="Post">
    <Input Type="hidden" Name="pubdate" value="<%=Date()%>">
    <Center>
    <Table>

    <TR>
    <TD><Font Face="Arial" Size="3"><b>Name/b></Font><BR></TD>
    <TD><Input Type="password" Name="vpw" Size="40"><BR></TD>
    </TR>

    </Table>
    </Center>
    <br>
    <Center>
    <Input Type = "submit" Value="submit">
    <Input Type = "reset" Value="clear">

    Can anyone tell me what's going on?

  2. #2
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Welcome to the wonderful world of web design.

    This is the industry which you, dear newcomer, and us hackneyed veterans love and hate. The exact same question will plague you every day of your professional life.

    And some more.

    Fear not the feeling "I hate Netscape"
    Fear not the dread knowledge "That worked yesterday"
    Fear not the stress of "Does this work on the Mac?"

    Do not fear to tread where Angels would never ever go. Webdesign is flux, what works only works sometimes, and never always. You have reached Web Design Nirvana only when you learn to say "It works well enough for everybody". For some better, for some worse, but acceptable for all.

  3. #3
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On a more serious note:

    You didnt close the form tag.
    You are using Font tags??? No way, too radical.
    Why do you need to redefine the text on the Submit and Cancel buttons?

    You have mucho WhiteSpace between Tags. kill that stuff, man, thats just baaad.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Try using CSS instead:
    Code:
    input {
      width: 200px;
    }
    That will keep all <input> tags the same size.

  5. #5
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And the solution is:
    Code:
    <Input style="width: 150px" Type="hidden" Name="pubdate" value="<%=Date()%>">
    <Input style="width: 150px" Type="password" Name="vpw" Size="40">
    Kill the font tags, and the tables too if you can.
    Use CSS for all of your layout needs.
    Last edited by asterix; Mar 22, 2004 at 14:23. Reason: typo tpo

  6. #6
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ha, vinnie, you killed my fun, beat me to the post


Bookmarks

Posting Permissions

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