how to reduce the div height

前端 未结 4 726
清酒与你
清酒与你 2021-01-23 20:44
4条回答
  •  孤街浪徒
    2021-01-23 21:32

    A div's height depends on its inner elements, in your example, the first input is having a height of 100px, so the div will have at least 100px height, ignoring spacing, boarder, padding. Setting max-height on the div will hint the rendering engine to limit the height, but doesn't necessarily work all the time.

    I'd suggest you changing the input's height first:

    
    

提交回复
热议问题