I am trying to left align some text and center align another set of text.
This is a snippet of my HTML:
<div class="header-inner">
<div class="logo">
<a href="">Puremedia.</a>
</div>
<nav id="nav-wrap">
<ul id="nav" class="nav">
<li class="current"><a href="">Home.</a></li>
<li><a href="">Stores.</a></li>
<li><a href="">Solutions.</a></li>
<li><a href="">About Us.</a></li>
<li><a href="">Volunteer With Us.</a></li>
</ul>
</nav> <!-- /nav-wrap -->
</div> <!-- /header-inner -->
This is a snippet of my CSS:
/* g. Header Styles
/* =================================================================== */
header {
height: 72px;
width: 100%;
position: fixed;
left: 0;
top: 0;
z-index: 990;
background: #0e1015;
text-align: center;
}
header .logo {
display: inline-block;
vertical-align: middle;
}
header .logo a {
margin: 0 20px 0 0;
width: 126px;
height: 12px;
font-family: "raleway-SemiBold", sans-serif;
text-decoration: none;
color: white;
font-size: 17px;
}
/* navigation
--------------------------------------------------------------------- */
/* nav-wrap */
#nav-wrap {
font: 11px "raleway-heavy", sans-serif;
text-transform: uppercase;
letter-spacing: 1.5px;
display: inline-block;
}
ul#nav li {
position: relative;
list-style: none;
height: 72px;
display: inline-block;
}
ul#nav li a {
display: inline-block;
padding: 17px 12px;
line-height: 38px;
text-decoration: none;
color: #c0cdd1;
}
ul#nav li a:hover {
color: white;
}
ul#nav li a:active {
background-color: transparent !important;
}
ul#nav li.current a {
background: #209907;
color: white;
}
My full code can be found here: https://embed.plnkr.co/plunk/guJBhxkzAK4fTTasEEQX
Currently, the Change ASEAN and the NAV bar items are all center aligned. However, what I am trying to do is to have the Change ASEAN all the way to the left and the NAV bar items in the center. How do I do this?
For Now my header looks like this:
I achieved this by doing a manual positioning using padding. However, I am not sure if the alignment would still look like this when people with smaller/larger screens open the website. Therefore, I was thinking of using text-align or float. However, it seems that I can only text-align/float the logo and NAV bar as a whole. Meaning center everything or left justify everything. Is there a way to left justify the logo and center the NAV bar?