Its because of this line:
* {
border: 1px solid black;
}
You’re applying a 1px border to every element on the page. All those borders are adding up to push the width of the page beyond 100% of the screen size.
You should remove that line and apply your borders more judiciously. For elements that have borders, you may also want to consider using:
box-sizing: border-box;
Additionally, you should add the following lines:
body{
margin:0;
}
#nav ul{
padding:0;
}
You can remove the margin:-10px;
on #nav