开发者

Should we always use Padding in place of margin wherever is possible to avoid situations of "Double Margin" bug?

开发者 https://www.devze.com 2023-01-08 14:56 出处:网络
Should we always use Padding in place of margin wherever is possible to avoid situa开发者_运维问答tions of \"Double Margin\" bug?No. Setting display: inline; is a simple workaround that doesn\'t affec

Should we always use Padding in place of margin wherever is possible to avoid situa开发者_运维问答tions of "Double Margin" bug?


No. Setting display: inline; is a simple workaround that doesn't affect other browsers.


Depends on the design. There are many contexts where using padding instead of margins doesn't make sense.

If you're having trouble with a browser bug then by all means try using padding instead of margin, but it's throwing the baby out with the bathwater to say "I will never use padding ever again!"

0

精彩评论

暂无评论...
验证码 换一张
取 消