SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simply Contact Form question

    How can I put a line space between "Company Name" and "Address"?

    How can I change the color of the field borders?

    Thanks.

    Code:
    	<form action='form_handle.php' method='post' name='myform' >
    	<table border='0' padding='0' spacing='0' >
    	<tr>
    	<td>Company Name:</td>
    	<td><input type='text' size='45' name='company_name'></td>
    	</tr>
    	<tr>
    	<td>Address:</td>
    	<td><input type='text' size='45' name='address'></td>
    	</tr>
    	<tr>
    	<td>City:</td>
    	<td><input type='text' size='45' name='city'></td>
    	</tr>
    	<tr>
    	<td>State:</td>
    	<td><input type='text' size='4' name='state'></td>
    	</tr>
    	<tr>
    	<td>Zip:</td>
    	<td><input type='text' size='9' name='zip'></td>
    	</tr>
    	</table>
    	</form>

  2. #2
    SitePoint Member
    Join Date
    Aug 2011
    Location
    Manchester, England
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <form action='form_handle.php' method='post' name='myform' >
    	<table border='0' padding='0' spacing='0' >
    	<tr>
    	<td>Company Name:</td>
            <td>
        	<input type='text' size='45' name='company_name' class="border" >
            <br /><br />
    	</td>
    
    	</tr>
    	<tr>
    	<td>Address:</td>
    	<td><input type='text' size='45' name='address' class="border"></td>
    	</tr>
    	<tr>
    	<td>City:</td>
    	<td><input type='text' size='45' name='city' class="border"></td>
    	</tr>
    	<tr>
    	<td>State:</td>
    	<td><input type='text' size='4' name='state' class="border"></td>
    	</tr>
    	<tr>
    	<td>Zip:</td>
    	<td><input type='text' size='9' name='zip' class="border"></td>
    	</tr>
    	</table>
    	</form>
    And then in the css file, or before </head>

    Code:
    <style type="text/css">
    .border {
    	border:solid 1px #0F0;
    }
    </style>
    solid = soild border
    1px = thickness
    #0F0 = colour

    as for the line, I'd just stick a couple of line breaks in, or give the row a height

  3. #3
    SitePoint Zealot Amit Yaron's Avatar
    Join Date
    Jan 2011
    Location
    Hod Haharon, Israel
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How many columns do you have in a row? 2?
    You can add an empty row by typing:
    Code:
    <tr>
      <td colspan="2"><br /></td>
    <tr>
    If you want to add a border to a field add a class to it, for example
    <div class="myclass" > ....

    Define the border in CSS:
    CSS Border
    Amit Yaron
    My Blog: PHP & More.


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
  •