html - dropdown menu does not cover the text underneath /z-index -


enter image description hereenter image description herehi have created drop down menu. want inject in navigation. when drop down menu opens jumps in navigation , makes height longer. don't want happens want opens on cloud don't change navigation height, tried use z-index did not work! below find codes plz:

    .social{      	height:50px;      	text-align: center;      	width:70pt;      	cursor:pointer;       	position: absolute;      	      }            .first{      	padding-top:5px;      	height: 25pt ;      	color:white;      	background:black;            }                  .second{      	z-index:5;      	padding-top:5px;      	height: 25pt ;      	display:none;      }            .social:hover .first{      	background:@gray-dark ;      	.first-hover:hover{      		color:@blue;      	}      }            .social:hover .second {      	background:white;      	display:block;      	color:grey;      	.second-hover:hover{      		color:@blue;            	}      }
 <div class="social">         <div class="first">           <ul class="header-social list-inline right">             <li >               <a  href="https://www.facebook.com" target="_blank">                 <i class="icon icon-facebook first first-hover" ></i>               </a>             </li>             <li >               <a  href="https://twitter.com" target="_blank">                 <i class="icon icon-twitter first first-hover"></i>               </a>             </li>             <li >              <a href="https://www.instagram.com" target="_blank">                <i class="icon icon-instagram first first-hover"></i>              </a>            </li>          </ul>		        </div>        <div class="second">           <ul class="header-social list-inline right">             <li >               <a  href="https://www.youtube.com" target="_blank">                 <i class="icon icon-youtube second second-hover"></i>               </a>             </li>             <li >               <a  href="https://twitter.com" target="_blank">                 <i class=" icon icon-twitter second second-hover"></i>               </a>             </li>             <li >              <a href="https://www.instagram.com" target="_blank">                <i class="icon icon-pintrest second second-hover"></i>              </a>            </li>          </ul>		        </div>              <div>          dsfsdfdsfsdf        </div>      </div>

try adjust positioning , z-index of unordered list , width of well.

    .social{      	height:50px;      	text-align: center;      	width:70pt;      	cursor:pointer;       	position: absolute;      	      }            .first{      	padding-top:5px;      	height: 25pt ;      	color:white;      	background:black;            }            .social:hover .second ul{         display:block;         width:100%;         position: relative;         z-index:1111;         margin:0;         padding:0;      }      .second{      	z-index:5;      	padding-top:5px;      	height: 25pt ;      	display:none;      }            .social:hover .first{      	background:@gray-dark ;      	.first-hover:hover{      		color:@blue;      	}      }            .social:hover .second {      	background:white;      	display:block;      	color:grey;      	.second-hover:hover{      		color:@blue;            	}      }
 <div class="social">         <div class="first">           <ul class="header-social list-inline right">             <li >               <a  href="https://www.facebook.com" target="_blank">                 <i class="icon icon-facebook first first-hover" ></i>               </a>             </li>             <li >               <a  href="https://twitter.com" target="_blank">                 <i class="icon icon-twitter first first-hover"></i>               </a>             </li>             <li >              <a href="https://www.instagram.com" target="_blank">                <i class="icon icon-instagram first first-hover"></i>              </a>            </li>          </ul>		        </div>        <div class="second">           <ul class="header-social list-inline right">             <li >               <a  href="https://www.youtube.com" target="_blank">                 <i class="icon icon-youtube second second-hover"></i>               </a>             </li>             <li >               <a  href="https://twitter.com" target="_blank">                 <i class=" icon icon-twitter second second-hover"></i>               </a>             </li>             <li >              <a href="https://www.instagram.com" target="_blank">                <i class="icon icon-pintrest second second-hover"></i>              </a>            </li>          </ul>		        </div>              <div>          dsfsdfdsfsdf        </div>      </div>


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -