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

前端 未结 8 720
你的背包
你的背包 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:10

    Set the outer div as "position: relative" the div you want to move as "position: absolute" and set the top and left values. this will position the item relative to the outer div (not the page). relative position leaves gaps. absolute does not.

提交回复
热议问题