Jump to content
Sign in to follow this  
Leudassdf

Textbox do tamanho da coluna

Recommended Posts

Leudassdf

<tr>
  <td style="width: 82px"  >
   <asp:TextBox ID="TextBox1" runat="server" Width="82px"></asp:TextBox>
   </td>
  <td  >
   <asp:TextBox ID="TextBox2" runat="server" Width="100%"></asp:TextBox>
   </td>
   <td >
    <asp:TextBox ID="TextBox3" runat="server" Width="100%"></asp:TextBox>
   </td>
 <td >
	 <asp:TextBox ID="TextBox4" runat="server" Width="82px"></asp:TextBox>
   </td>
 <td >
	 <asp:TextBox ID="TextBox5" runat="server" Width="70px"></asp:TextBox>
   </td>
 <td>
	 <asp:TextBox ID="TextBox6" runat="server" Width="95px"></asp:TextBox>
   </td>
 <td align="center" style="width: 81px" >
	 <asp:CheckBox ID="chk_bio" runat="server" Width="100%"/>
   </td>
 <td >
	 <asp:TextBox ID="TextBox7" runat="server" Width="100%"></asp:TextBox>
   </td>
 <td >
	 <asp:TextBox ID="TextBox8" runat="server" Width="100%"></asp:TextBox>
   </td>
	 <td>
		 <asp:TextBox ID="TextBox9" runat="server" Width="100%"></asp:TextBox>
   </td>
  </tr>

  </table>

Boas pessoal,

Como podem constatar no código em cima,onde tenho <td style="width: 82px" > <asp:TextBox ID="TextBox1" runat="server" Width="82px"></asp:TextBox> </td>, eu defino o tamanho da coluna em 82px e o tamanho da texbox em 82px. Na outra coluna nao defino tamanho nenhum. pois quero que ele se adapte. mas o problema é que eu quero que a textbox ocupe toda a coluna.

Se por exemplo colocarmos a coluna com 82px e o comprimento da texbox a 100%, a textbox ultrapassa a borda da coluna.

Eu gostaria de saber se alguem sabe como posso resolver o problema

Cumprimentos

Share this post


Link to post
Share on other sites
ark15

<table width="600px">
    <tr style="padding:1px;">
	    <td style="width:82px; padding:1px">
		    <asp:TextBox runat="server" Width="82px"></asp:TextBox>
	    </td>

	    <td style="padding:1px">
		    <asp:TextBox runat="server" Width="100%"></asp:TextBox>
	    </td>

	    <td style="width:82px; padding:1px">
		    <asp:TextBox runat="server" Width="82px"></asp:TextBox>
	    </td>

	    <td style="padding:0px">
		    <asp:TextBox runat="server" Width="100%"></asp:TextBox>
	    </td>

		 <td style="width:100px; padding:1px">
		    <asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox>
	    </td>

		 <td style="width:50px; padding:1px">
		    <asp:TextBox ID="TextBox2" runat="server" Width="100%"></asp:TextBox>
	    </td>

		 <td style="width:20px; padding:1px"">
		    <asp:TextBox ID="TextBox3" runat="server" Width="100%"></asp:TextBox>
	    </td>
    </tr>
   </table>

é isto ?

Share this post


Link to post
Share on other sites
Leudassdf

<table width="600px">
 <tr style="padding:1px;">
	 <td style="width:82px; padding:1px">
		 <asp:TextBox runat="server" Width="82px"></asp:TextBox>
	 </td>

	 <td style="padding:1px">
		 <asp:TextBox runat="server" Width="100%"></asp:TextBox>
	 </td>

	 <td style="width:82px; padding:1px">
		 <asp:TextBox runat="server" Width="82px"></asp:TextBox>
	 </td>

	 <td style="padding:0px">
		 <asp:TextBox runat="server" Width="100%"></asp:TextBox>
	 </td>

		 <td style="width:100px; padding:1px">
		 <asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox>
	 </td>

		 <td style="width:50px; padding:1px">
		 <asp:TextBox ID="TextBox2" runat="server" Width="100%"></asp:TextBox>
	 </td>

		 <td style="width:20px; padding:1px"">
		 <asp:TextBox ID="TextBox3" runat="server" Width="100%"></asp:TextBox>
	 </td>
 </tr>
</table>

é isto ?

Isso e mais ou menos o que tenho. o problema é que ao definir a texbox com o comprimento em % neste caso a 100% a mesma fica ligeiramente fora do limite direito da coluna.

Share this post


Link to post
Share on other sites

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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. 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.