Stop absolutely positioned div from overlapping text

前端 未结 8 2039
旧时难觅i
旧时难觅i 2020-12-24 06:03

Here is a simplification of my layout:

8条回答
  •  不思量自难忘°
    2020-12-24 06:43

    Content of unknown length

    Content of unknown height

    This should be a comment but I don't have enough reputation yet. The solution works, but visual studio code told me the following putting it into a css sheet:

    inline-block is ignored due to the float. If 'float' has a value other than 'none', the box is floated and 'display' is treated as 'block'

    So I did it like this

    .spacer {
        float: left;
        height: 20px;
        width: 200px;
    }
    

    And it works just as well.

提交回复
热议问题