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
ark15

Quando metes a text box a 100% , defines um tamanho fixo no td.

Tipo:

<td style="width:50px;">

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.