I am trying to figure out why the mobile drop down navigation is not floating to the right of the HorizonNagigationLogo div. I also would like to figure out how to make the drop down menu take up 100% of the screen with 2 links side by side. Could someone look at this code and tell me where I am going wrong? Right now the mobile drop down image sits under the logo and the sub links only take the width of the HorizonNagigationMobile div.
Code:
* {
margin : 0;
padding : 0;
}
body {
margin : 0;
padding : 0;
}
.HorizonNagigationcontainer {
width : 100%;
}
.HorizonNagigationLogo {
width : 72%;
height : 74px;
margin-top : 2%;
float : left;
margin-left: 3%;
}
.HorizonNagigationLogo img {
width : 100%;
max-width : 319px;
float : left;
}
.HorizonNagigationMobile {
width: 25%;
}
.HorizonNagigationMobile ul{
list-style:none;
font-weight:bold;
float:left;
width:100%;
position:relative;
z-index:5;
background-color: rgba(255,255,255,0);
}
.HorizonNagigationMobile li{
float:right;
position:relative;
width: 100%;
}
.HorizonNagigationMobile a{
display:block;
padding-top:10px;
padding-bottom:10px;
width: 100%;
color:#fff;
background: rgba(255,255,255,0);
text-decoration:none;
}
.HorizonNagigationMobile a:hover{
color:#fff;
background:#FFCC66;
text-decoration:underline;
}
/*--- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN ---
--- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN ---
--- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN --- --- DROPDOWN ---
*/
.HorizonNagigationMobile ul ul{
background:#fff;
background: rgba(255,255,255,0);
list-style:none;
position:absolute;
left:-9999px;
width:100%;
}
.HorizonNagigationMobile ul li ul li {
padding-top:1px;
float: none;
width: 100%;
}
.HorizonNagigationMobile ul a{
width: 100%;
}
.HorizonNagigationMobile li:hover ul{
left: 0;
}
.HorizonNagigationMobile li:hover a{
background:#FFCC66;
text-decoration:underline;
}
.HorizonNagigationMobile li:hover ul a{
text-decoration:none;
}
.HorizonNagigationMobile li:hover ul li a:hover{
background:#FF9900;
}
Here is the html:
Code:
<div class="HorizonNagigationcontainer">
<div class="HorizonNagigationLogo">
<img src="images/logo.jpg" alt="Logo">
</div>
<div class="HorizonNagigationMobile">
<ul>
<li><a href="#"><img alt="Navigation" src="images/mobileimg.png"></a>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Our Difference</a></li>
<li><a href="#">Contact Us</a></li>
</ul></li>
</ul>
</div>
</div>
Learn AngularJS By Building A Quiz App From Scratch
Learn AngularJS By Building A Quiz App From Scratch