Results 1 to 9 of 9

Thread: Text box border

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Proctor,Vt USA
    Posts
    47

    Text box border

    We have users fill out information, (it seems they would rather type it out on the web page) through a series of input textboxes then they print the page bring into the office for approval. Is there a way to have the input text borderless or at least print with out the borders? Thanks in advance Steve

  2. #2
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    Loads of ways to do this, a DIV block with contentEditable attribute set, or turn off the border of the Text Input:
    Code:
    <HTML>
    <HEAD>
    <TITLE>Borders test page</TITLE>
    </HEAD>
    <BODY>
    	<table width="50%">
    		<tr><td><i>Normal Text Input:</i></td></tr>
    		<tr><td><input type="text" style="width:100%" id=text1 name=text1 value="Type Here!"></input></td></tr>
    		<tr><td>&nbsp;</td></tr>
    		<tr><td><i>Normal Text Input (no border):</i></td></tr>
    		<tr><td><input type="text" style="width:100%;Border:none" id=text2 name=text2 value="Type Here!"></input></td></tr>
    		<tr><td>&nbsp;</td></tr>
    		<tr><td><i>Normal Text Input (flat border):</i></td></tr>
    		<tr><td><input type="text" style="width:100%;Border:solid 1px gray" id=text3 name=text3 value="Type Here!"></input></td></tr>
    		<tr><td>&nbsp;</td></tr>
    		<tr><td><i>Div Text Input (inset border & contentEditable):</i></td></tr>
    		<tr><td><div type="text" contenteditable style="width:100%;Border:inset 2px" id=div1 name=div1>Type Here!</div></input></td></tr>
    		<tr><td>&nbsp;</td></tr>
    		<tr><td><i>Div Text Input (no border & contentEditable):</i></td></tr>
    		<tr><td><div type="text" contenteditable style="width:100%;Border:none" id=div2 name=div2>Type Here!</div></input></td></tr>
    		<tr><td>&nbsp;</td></tr>
    		<tr><td><i>Div Text Input (flat border & contentEditable):</i></td></tr>
    		<tr><td><div type="text" contenteditable style="width:100%;Border:solid 1px gray" id=div3 name=div3>Type Here!</div></input></td></tr>
    	</table>
    </BODY>
    </HTML>
    Try my example and let me know if it was helps!
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Proctor,Vt USA
    Posts
    47
    the second and fifth one will work as long as they know thats where to enter information. thanks again, Steve
    Last edited by dmach8; Feb 21st, 2002 at 12:26 PM.

  4. #4
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Jerry, what browsers is your page supposed to work under?
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  5. #5
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    Will work on browsers which support the STYLE attribute (CSS) and the contentEditable attribute, so it limits the browsers a bit!

    Try IE 5.5 or IE 6.0

    All should work for them!

    I supose you are a Netscape fan then?
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  6. #6
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    I didn't bother testing it in Netscape, but it doesn't work in Opera 6. I haven't checked the documentation, but my first guess is that your page strays from the standard to a degree accepted by IE.

    And I keep saying that IE is the world's worst browser, but you know.... it isn't IE's fault. The IE user base thinks that IE sets the standards. I guess it is IE users, not IE that is to blame.

    'Course, like I said, I'm not going to waste time looking up the documentation on this particular incident, so it may not be the fault of IE or any browser (Opera may be at fault or this may be specified at the discretion of the UA in the standards).
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  7. #7
    scoutt
    Guest
    Travis, you might want to put the form tags in that code. I know netscape will not work without the form tags, not sure about opera. so that might be your problem. once again IE interprets what the user meant.

  8. #8
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I know this has probably been answered already, but I would use an Embedded StyleSheet instead of an In-Line Stylesheet so you can reuse it with less typing:

    Code:
    <html>
    <head>
    <style>
    .form { border: none; }
    </style>
    </head>
    <body>
        <form>
            First Name: <input type="text" name="fname" class="form">
        </form>
    </body>
    </html>
    If you're intrested in learning more CSS, check out my tutorial here: http://www.mindlessdrone.com/tutoria...r/cssone.shtml
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Or if you even want to get more simplistic and make it apply to every Input tag, then use:

    Code:
    <html>
    <head>
    <style>
    input { border: none; }
    </style>
    </head>
    <body>
        <form>
            First Name: <input type="text" name="fname">
        </form>
    </body>
    </html>
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width