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
https://forums.phpfreaks.com/topic/68116-alignment-problem/
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
https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344261
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
https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344339
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.