Wondering how to have my #header positioned fixed and not having it become wider.
I checked my code several times and can't seem to figure out what is interfering with the width of my header. For some reason it becomes wider and jumps a bit down while I gave it a 70% width before and don't change the width anywhere later on.
How can I have my header position fixed with the correct width: 70% and not having it jump down? Also is there a correct way or better way than I have now to have my "My name" & my nav next to each other in the #header? My name on the left and the nav on the right in the #header.
HTML5:
<body>
<section id="Header" class="group">
<header>
<h2><a href="http://www.epicforever.com">My Name</a></h2>
</header>
<nav class="main">
<ul class="group">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</section>
<section id="TopContainer" class="group">
<p>Welcome to my Portfolio</p>
<p>Webdevelopment is my passion and I'd love to design and develop a website for you
sometime!</p>
<div class="block1">
<header><h2>Brand</2></header>
</div>
<div class="block2">
<header><h2>Web</h2></header>
</div>
<div class="block3">
<header><h2>Design</h2></header>
</div>
<aside><p>See all projects<a href="#">// brand // web // print</a></p></aside>
</section>
CSS3:
html {
width: 100%;
}
body{
background-image: url("img/bg.png");
font-family: arial, 'Lucida Sans Unicode';
font-size: 87.5%;
line-height: 15px;
color: #000305;
}
#Header, #TopContainer, #MidContainer, #AboutContainer, #ContactContainer{
width: 70%;
margin: 0 auto;
}
#Header{
padding: 0 10% 0 10%;
background-color: #fff;
margin-top: -8px;
position: fixed;
}
#Header header h2 {
padding-top: 13px;
}
#Header nav{
text-align: right;
}
#Header nav ul li{
list-style: none;
display: inline-block;
padding: 5px;
}
#TopContainer{
height: 150px;
padding: 0 10% 10% 10%;
background-color: #fff;
margin-top: 90px; /* change this at the end*/
}