Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables height and width issue

Status
Not open for further replies.

Nanda

Programmer
Nov 14, 2000
104
US
Hi there!!
I do not know how to fix the alignment/size problem for my tables (cells contents).
1. Because of Form tag, the height of my cell increase.
Code is:
<table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;><tr>
<td>
<form method=&quot;post&quot; Name=&quot;formgotoPage&quot;>
<input type=&quot;hidden&quot; name=&quot;pageRequest&quot; Value=&quot;result&quot;>
<input type=&quot;hidden&quot; name=&quot;pageAction&quot; Value>
<script language=&quot;javascript&quot;>
<!--
function SubmitForm(el){
document.formgotoPage.pageAction.value = el
document.formgotoPage.submit()
}
-->
</script>
<font face=&quot;verdana&quot; size=&quot;1&quot;>
<%For i = 1 to 10%>
 <a href=&quot;javascript:SubmitForm(<%=i%>)&quot;><%=i%></a>
<%Next%>
</font>
</form>
</td>
<td>
<form method=&quot;post&quot; action id=&quot;formNext&quot; name=&quot;formNext&quot;>
<input type=&quot;hidden&quot; name=&quot;pageRequest&quot; Value=&quot;result&quot;>
<input type=&quot;hidden&quot; name=&quot;pageAction&quot; Value=&quot;next&quot;>
<a href=&quot;javascript:document.formNext.submit();&quot;>
<img SRC=&quot;images/nav_next.gif&quot; alt=&quot;Next&quot; WIDTH=&quot;17&quot; HEIGHT=&quot;20&quot; border=0></a>
</form>
</td>
</tr>
</table>
As I remove the Form tags from cells, extra height space will be removed.

2. Do not know how to reduce the extra width of 1st cell containing limg and 3rd cell containing rimg. It is kind of that width of cell should adjust as per contents in it. Sometime, I am really unable to understand the table behaviour:-(
Code is:
<table border=0 cellpadding=0 cellspacing=0>
<tr><td align=left valign=top><Img src=&quot;images/limg.gif&quot; alt=&quot;limg&quot; height=15 width=6></td>
<td bgcolor=&quot;#0000A0&quot;><font size=&quot;1&quot; face=&quot;Verdana, Arial, Helvetica&quot;color=&quot;#FFFFFF&quot;>
<b>State</td>
<td valign=top><Img src=&quot;images/rimg.gif&quot; alt=&quot;rimg&quot; width=6 height=15></td>
</tr>
<tr><td colspan=3><select multiple size=&quot;5&quot; name=&quot;states&quot; >
<option value=&quot;&quot;><%=string(15,&quot;-&quot;) &&quot; All States &quot; & string(25,&quot;-&quot;)%></option>
<OPTION>A</OPTION>
<OPTION>A</OPTION>
<OPTION>A</OPTION>
<OPTION>A</OPTION>
<OPTION>A</OPTION>
<OPTION>A</OPTION>
</SELECT></td></tr>
</table>
Thanks to all those help me to solve this.
 
1. Try this:
Code:
<form method=&quot;post&quot; Name=&quot;formgotoPage&quot;>
<table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
 <tr>
  <td>
   <input type=&quot;hidden&quot; name=&quot;pageRequest&quot; Value=&quot;result&quot;>
   <input type=&quot;hidden&quot; name=&quot;pageAction&quot; Value>
   <script language=&quot;javascript&quot;>
   <!--
    function SubmitForm(el)
    {
     document.formgotoPage.pageAction.value = el
     document.formgotoPage.submit()
    }
   -->
   </script>
   <font face=&quot;verdana&quot; size=&quot;1&quot;>
   <%For i = 1 to 10%>
    <a href=&quot;javascript:SubmitForm(<%=i%>)&quot;><%=i%></a>
   <%Next%>
   </font>
  </td>
</form>
<form method=&quot;post&quot; action id=&quot;formNext&quot; name=&quot;formNext&quot;>
  <td>
   <input type=&quot;hidden&quot; name=&quot;pageRequest&quot; Value=&quot;result&quot;>
   <input type=&quot;hidden&quot; name=&quot;pageAction&quot; Value=&quot;next&quot;>
   <a href=&quot;javascript:document.formNext.submit();&quot;>
   <img SRC=&quot;images/nav_next.gif&quot; alt=&quot;Next&quot; WIDTH=&quot;17&quot; HEIGHT=&quot;20&quot; border=0></a>
  </td>
 </tr>
</table>
</form>
2. Try this:
Code:
<table height=&quot;15&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
 <tr>
  <td height=&quot;15&quot; width=&quot;6&quot; align=&quot;left&quot; valign=&quot;top&quot;><img src=&quot;images/limg.gif&quot; alt=&quot;limg&quot; height=&quot;15&quot; width=&quot;6&quot;></td>
  <td bgcolor=&quot;#0000A0&quot; height=&quot;15&quot; width=&quot;100%&quot;><font size=&quot;1&quot; face=&quot;Verdana, Arial, Helvetica&quot; color=&quot;#FFFFFF&quot;><b>State</b></font></td>
  <td valign=&quot;top&quot; height=&quot;15&quot; width=&quot;6&quot;><img src=&quot;images/rimg.gif&quot; alt=&quot;rimg&quot; height=&quot;15&quot; width=&quot;6&quot;></td>
 </tr>
 <tr>
  <td colspan=&quot;3&quot;>
   <select multiple size=&quot;5&quot; name=&quot;states&quot;>
   <option value=&quot;&quot;><%=string(15,&quot;-&quot;) &&quot; All States &quot; & string(25,&quot;-&quot;)%></option>
   <OPTION>A</OPTION>
   <OPTION>A</OPTION>
   <OPTION>A</OPTION>
   <OPTION>A</OPTION>
   <OPTION>A</OPTION>
   <OPTION>A</OPTION>
   </SELECT>
  </td>
 </tr>
</table>
[sig]<p> Sincerely,<br><a href=mailto: > </a><br><a href= Anderson</a><br>CEO, Order amid Chaos, Inc.<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top