isaac_cm Posted September 5, 2007 Share Posted September 5, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/ Share on other sites More sharing options...
cmgmyr Posted September 6, 2007 Share Posted September 6, 2007 cellspacing="0" ? Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-342537 Share on other sites More sharing options...
soycharliente Posted September 6, 2007 Share Posted September 6, 2007 And you could also include a "padding: 0px;" in your CSS for the table id/class. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-342759 Share on other sites More sharing options...
isaac_cm Posted September 7, 2007 Author Share Posted September 7, 2007 neither cellspacing or padding solve the problem !!!! any new idea ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-343374 Share on other sites More sharing options...
soycharliente Posted September 7, 2007 Share Posted September 7, 2007 What exactly are you trying to do? Make the gap between the input boxes, on each row, smaller? Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-343494 Share on other sites More sharing options...
isaac_cm Posted September 7, 2007 Author Share Posted September 7, 2007 Yes Exactly Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-343618 Share on other sites More sharing options...
soycharliente Posted September 7, 2007 Share Posted September 7, 2007 And you're sure the cellpadding, cellspacing, and padding have no effect? cellspacing=0 should do the trick. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-343809 Share on other sites More sharing options...
isaac_cm Posted September 7, 2007 Author Share Posted September 7, 2007 I tried plz tried yourself with my html in the first thread Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-343881 Share on other sites More sharing options...
soycharliente Posted September 7, 2007 Share Posted September 7, 2007 I did try it and it works. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-343972 Share on other sites More sharing options...
isaac_cm Posted September 7, 2007 Author Share Posted September 7, 2007 could u plz post your html thanks Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344050 Share on other sites More sharing options...
soycharliente Posted September 8, 2007 Share Posted September 8, 2007 It's the exact same as yours.... except a 0 instead of a 4. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344133 Share on other sites More sharing options...
isaac_cm Posted September 8, 2007 Author Share Posted September 8, 2007 see attachment plz [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344212 Share on other sites More sharing options...
wildteen88 Posted September 8, 2007 Share Posted September 8, 2007 its the text (Description Here) that is causing your input boxes to be spaced a part more than you want. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344214 Share on other sites More sharing options...
isaac_cm Posted September 8, 2007 Author Share Posted September 8, 2007 yes I know so is there a solution to this , I need to place this text beside those input boxes Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344216 Share on other sites More sharing options...
soycharliente Posted September 8, 2007 Share Posted September 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344248 Share on other sites More sharing options...
wildteen88 Posted September 8, 2007 Share Posted September 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344261 Share on other sites More sharing options...
isaac_cm Posted September 8, 2007 Author Share Posted September 8, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/68116-alignment-problem/#findComment-344339 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.