Jump to content

alignment problem


isaac_cm

Recommended Posts

Hello,

I have a table (plz try the HTML) and I try to align the input tags so vertical spaces between them are narrower , any idea ?

 

thanks

 

<table width="100%" cellspacing="4" class="cust_info_box">
  <tr>
    <td width="18%" align="right" class="style6"> First Name:</td>
    <td width="33%"><input name="first_name" type="text" class="cust_info_box_readonly" tabindex="-1" size="30" readonly="readonly" /></td>
    <td width="44%" rowspan="8" align="left" valign="top"><p>Description here Description here Description here Description here Description here Description here Description here Description here Description here <br />
      </p>
      <p>Description here </p>
      <p>Description here </p>
      <p>Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here Description here </p>    </td>
    <td width="5%"> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> Last Name:</td>
    <td><input name="last_name" type="text" class="cust_info_box_readonly" tabindex="-1" size="30" readonly="readonly" /></td>
    <td> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> Address:</td>
    <td><input name="address1" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
    <td> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> Address:</td>
    <td><input name="address2" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
    <td> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> City/Town:</td>
    <td><input name="city" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
    <td> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> County/State:</td>
    <td><input name="state" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
    <td> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> Zip/Post Code:</td>
    <td><input name="zip" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
    <td> </td>
  </tr>
  <tr>
    <td align="right" class="style6">eMail:</td>
    <td><input name="email" type="text" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" id="email" size="30"/></td>
    <td> </td>
  </tr>
  
  
  <tr>
    <td colspan="2" align="center" class="style6"> </td>
    <td align="center" valign="middle"> </td>
    <td align="left" valign="middle"> </td>
  </tr>
</table>

Link to comment
Share on other sites

The "description box" shouldn't be an issue because it's not multiple boxes. It's one cell.

 

I changed the 4 to a 0 and it was fine. If your code reflects that and it's not working, then I don't know if I can be much help anymore.

charlie it'll display fine for you as you have a bigger screen resoulution than isaac_cm, looks at issac's screenshots they are using a screen res of 800 x 600. That is what I mean by the text.

Link to comment
Share on other sites

yes , I solve this and still the cellspacing = 4 I just added extra empty column to hold the cell height , but just for learning what is causing this and what is the solution ?

 

<table width="100%" cellspacing="4">
  <tr>
    <td width="21%" align="right" class="style6"> First Name:</td>
    <td width="26%"><input name="first_name" type="text" class="cust_info_box_readonly" tabindex="-1" size="30" readonly="readonly" /></td>
    <td width="50%" rowspan="10" align="left" valign="top">dsdescription here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here description here </td>
    <td width="3%" rowspan="10" align="left" valign="top"> </td>
  </tr>
  <tr>
    <td align="right" class="style6"> Last Name:</td>
    <td><input name="last_name" type="text" class="cust_info_box_readonly" tabindex="-1" size="30" readonly="readonly" /></td>
  </tr>
  <tr>
    <td align="right" class="style6"> Address:</td>
    <td><input name="address1" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
  </tr>
  <tr>
    <td align="right" class="style6"> Address:</td>
    <td><input name="address2" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
  </tr>
  <tr>
    <td align="right" class="style6"> City/Town:</td>
    <td><input name="city" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
  </tr>
  <tr>
    <td align="right" class="style6"> County/State:</td>
    <td><input name="state" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
  </tr>
  <tr>
    <td align="right" class="style6"> Zip/Post Code:</td>
    <td><input name="zip" type="text" size="30" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" /></td>
  </tr>
  <tr>
    <td align="right" class="style6">eMail:</td>
    <td><input name="email" type="text" class="cust_info_box_readonly" readonly="readonly" tabindex="-1" id="email" size="30"/></td>
  </tr>
  
  
  <tr>
    <td colspan="2" align="center" class="style6"> </td>
  </tr>
  <tr>
    <td colspan="2" align="center" class="style6"> </td>
  </tr>
</table>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.