Home  >  Q&A  >  body text

The shopping cart drop-down box appears below the search box

Teacher Miejie Shitai, hello:

I revised it according to what you said, as shown in the picture below. What is the reason for this?

1.jpg

TM.RuiTM.Rui2186 days ago1436

reply all(3)I'll reply

  • 灭绝师太

    灭绝师太2018-10-27 09:12:06

    Reason: If absolute positioning is set for an element, the element will break away from the document flow, so it will cover other elements.

    reply
    0
  • 灭绝师太

    灭绝师太2018-10-27 09:10:12

    Set the level of the drop-down box under the shopping cart to a higher level, z-index: 100

    reply
    0
  • TM.Rui

    OK, this problem has been solved. Because I followed your course, I found a bug when making this. You proposed this solution before the start of the lecture later, so you used z-index.

    TM.Rui · 2018-10-27 09:30:18
  • Cancelreply