CSS Negative margins for positioning

后端 未结 2 1841
慢半拍i
慢半拍i 2021-01-13 13:34

Is it ok to use negative margins for positioning? I have a lot in my current site and feel like it\'s not such a stable way to position things. I usually suggest to use them

2条回答
  •  情深已故
    2021-01-13 13:57

    Negative margins have been known to cause problems in IE7 and below with content being cut off. And, as alias suggests, it could also indicate a problem with the rest of the design. But I think it is wrong to say that negative margins are 'bad development' in all cases. But as always, test test test.

提交回复
热议问题