Float a div above page content

后端 未结 6 820
一生所求
一生所求 2020-12-03 00:33

I\'ve implemented a popup box that dynamically displays search options. I want the box to \"float\" above all of the site content. Currently, when the box is displayed it

6条回答
  •  一向
    一向 (楼主)
    2020-12-03 00:57

    The results container div has position: relative meaning it is still in the document flow and will change the layout of elements around it. You need to use position: absolute to achieve a 'floating' effect.

    You should also check the markup you're using, you have phantom

  • s with no container
      , you could probably replace both the div#suggestions and div#autoSuggestionsList with a single
        and get the desired result.

提交回复
热议问题