I am trying to left align my logo and right align my navigation. I am using the “skeleton” boilerplate for a responsive page.
The logo and nav wont stay on the same “line” when I float my Nav right. I removed the float right rule from the CSS before adding it to this example.
Here is some of the CSS I’m using and where i think the problem my be and the rest is listed here
.nav {
margin: 0px;
padding: 0px;
white-space: nowrap;
list-style-type: none;
}
.logo {
}
.nav li {
display:inline;
}
.nav li a {
padding:0.2em 1em;
background:#;
color:#000;
text-decoration:none;
border:0px solid #000;
}
.nav li a hover{
background:#08c;
color:#fff;
}
You’re missing the
alphaandomegaclasses that remove the margin from the left and right elements respectively.The HTML should look like this:
Here’s a Code Pen with the example code: http://cdpn.io/rHBio
EDIT
To explain further (even after the downvote #bitter).
The reason you have the navigation on two separate lines is because after the following media query the container and all of the columns are set to 300px.
There is another media query that overrides that one for any devices between 480px and 767px and gives a width of 420px.
Because the classes used,
two-thirdsandone-third, are now set to either 420px or 300px there they take up the entire row (they become stacked/linear).To override this and have them on the same line you will need to target those elements through additional CSS rules to reduce their width to 100/200px or 120/300px to fit in with the media queries.