CSS make textbox fill all available width

前端 未结 7 790
感动是毒
感动是毒 2021-02-12 09:53

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

\"Some Text\" \"Some more text\"
7条回答
  •  温柔的废话
    2021-02-12 10:17

    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

    
    
    

提交回复
热议问题