![](/img/trans.png)
[英]how to make input tag fill a whole <td> in a table with Bootstrap
[英]How to make INPUT element fill the entire table TD cell
嘗試這個:
table { width: 100%; border: 1px solid #ccc; } table td input { // display: block; width: 100%; }
<table> <tbody> <tr> <td> <input value = "this is the text"> </td> </tr> </tbody> </table>
如果您使用的是<input type =“ text”>:
input[type="text"] {
width: 100%;
box-sizing: border-box /* Just in case if you have defined
left or right padding to the input */
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.