CSS make textbox fill all available width

前端 未结 7 1375
太阳男子
太阳男子 2021-02-12 09:33

I have the following \"line\" in my web page

\"Some Text\" \"Some more text\"
7条回答
  •  情深已故
    2021-02-12 10:25

    This is not doable in CSS as far as Chrome is concerned. The feasible way is by manipulating the size attribute of the form control through JavaScript. If the length of the string is 25, add an extra of at least 10 for the clearance.

    HTML

    
    
    

    JavaScript / jQuery

    
    

    Another option also is by pre-calculating the size from a back-end script.

    PHP / HTML

    
    
    

提交回复
热议问题