Why don't <textarea> and <input> elements respect max-width?

后端 未结 3 1475
情话喂你
情话喂你 2021-01-19 00:34

The following HTML:


         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-19 01:05

    A div - like any other block-element - generally takes 100% of the available width. Because you limited the width (with max-width) to 200px, the div will have 200px.