Reputation: 2062
Im building a responsive navigation menu for my site. I have here quite few problems im not able to figure out since im new to web design.
There's a logo on the left side of the header and the menu on its right. When resolution is less than 750 px, a media query kicks in and launches a mobile design.
What i want:
li
elements) should be in the left corner of the screen.what is happening:
Here's a demo: http://jsfiddle.net/NYQnh/
This is the mobile query CSS code:
@media screen and (max-width: 750px){
nav ul{
max-height: 0px;
}
.showing{
max-height: 15em;
}
nav ul li{
box-sizing: border-box;
width: 100%;
padding: 5px;
text-align: left;
}
.nav_arr{
display: none;
}
nav li:before {
content: "";
padding: 0px;
}
.handle{
display: block;
padding-bottom: 0px;
}
}
please advise
Upvotes: 0
Views: 2743
Reputation: 9476
1.) You already have the class showing
added in your html <ul class="showing">
, therefore the nav is expanded on default. Remove the class to make it work.
2.) The Logo is moved to the next line, because of the margin of the navigation. Add
.nav_menu {
margin-right: 5px;
}
to your media query.
3.) Which "items" do you mean?
4.) Giving the Logo a padding, works for me..
#logo {
padding: 5px;
}
UPDATE
I updated your fiddle with the missing styles. I also moved the handle
element in your HTML out of the nav
element, to be more flexible. But this shouldn't cause you any trouble, since it is just used in the responsive version.
Btw: you were not able to change the logo's position, because you targeted the class .logo
in your CSS, but your logo has a ID #logo
..
Upvotes: 1