How to recalculate correct position

后端 未结 2 725
一整个雨季
一整个雨季 2021-01-29 09:54

I think I am been misunderstood here so I will rephrase my question.
THE PROBLEM: when I \"hover\" over the menu the black span with class \"problem\" follows

相关标签:
2条回答
  • 2021-01-29 10:19

    I'd start by updating the .menu styles thusly:

    float: none;
    width: 715px;
    height: 30px;
    display: block;
    position: relative;
    margin: 9px auto;
    

    You'll then need to move the active element behind it, which you can possibly do by applying a negative top-margin

    0 讨论(0)
  • 2021-01-29 10:29

    Set the CSS of the menu div to:

    width://insert wanted width here
    margin:auto;
    

    With a fixed width and auto margin, CSS will center your div.

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