简体   繁体   中英

How to place dropdownbox upon navigation bar in html

I have added navigation Bar and need to placed dropdown box on it, but dropdownbox hides under navigation bar, This is my dropdown box code

<div class="wrapper">
<div class="button">
<div id="ddmenu">
<ul>                
    <li>SHARE
        <div>
            <div class="column">
                <a id="sendFacebook" onclick="share(3)" href="#">Email</a>
                <a id="sendMMS" onclick="share1(3)" href="#">MMS</a>

            </div>
        </div>
    </li>      
  </ul>    
</div>
</div>

button Class

.wrapper {
text-align: center;
 }

.button {
position: absolute;
top: 10%;
left: 20px;
}

navigationBar class

.navigationBar {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 45px;
background-color: #333;
background-repeat: repeat-x;
color: #FFF;
text-align: center;
line-height: 44px;
font-size: 14pt;
-webkit-text-shadow: 0px -1px 0px #000;
text-shadow: 0px -1px 0px #000;
 }

What i tried is, changed the position of .navigationBar to relative but this made to navigation bar to appear at the bottom.

最简单的破解方法是为按钮Class添加z-index的CSS值。

z-index: 100;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM