Negative Margins, Hack or Not?

后端 未结 3 823
不知归路
不知归路 2021-02-18 17:18

I\'ve come across various posts where people are stating that negative margins are hacks. Thus I\'ve strayed away from using them with exception to particular cases when I can j

3条回答
  •  一生所求
    2021-02-18 17:44

    I suspect they've been labeled as a hack because of inconsistent browser behavior.

    Whenever possible I use position: relative and negative top and left values to pull elements into new locations. This isn't possible for every case, but I find it behaves more consistently in all the Internet Explorer flavors.

提交回复
热议问题