How to remove whitespace that appears after relative positioning an element with CSS

前端 未结 8 704
你的背包
你的背包 2020-12-08 02:33

The problem occurs is the following: After relative positioning an element with CSS I get a white-space of where the element was... I don\'t want the white-space!

相关标签:
8条回答
  • 2020-12-08 03:30

    set height to 0: height:0px;.

    Now this div can be placed anywhere.

    0 讨论(0)
  • 2020-12-08 03:31

    If you are brave enough, you may put overflow:hidden; and a bottom negative margin on relatively positioned element, and it will remove the spacing leftover :) i.e. on responsive site.

    But do check it doesn't hide a needed content.

    0 讨论(0)
提交回复
热议问题