Cannot add `margin` to `` element in Safari & Chrome (WebKit)

后端 未结 6 903
无人共我
无人共我 2020-12-14 08:37

EDIT: As of 2012-06-11 this bug has been finally fixed! https://bugs.webkit.org/show_bug.cgi?id=35981#c1

I have some pretty straightforward markup:<

6条回答
  •  再見小時候
    2020-12-14 08:46

    Sorry to post an answer to such an old thread, but there's actually a pretty easy solution for this that doesn't require any hacks. All you need to do is add padding to the top of your fieldset element.

    fieldset { padding: 10px 0 0; }
    

    This might make what I'm trying to say a little more clear: http://jsfiddle.net/8fyvY/

提交回复
热议问题