Is there any way to have a fieldset width only be as wide as the controls in them?

前端 未结 12 1573
情深已故
情深已故 2020-12-08 05:53

It seems that fieldset defaults to 100% width of its container. Is there any way that you can have the field set just be as big as the widest control inside the fieldset?

12条回答
  •  长情又很酷
    2020-12-08 06:31

    Use display: inline-block, though you need to wrap it inside a DIV to keep it from actually displaying inline. Tested in Safari.

    
    
    Blah ...

提交回复
热议问题