I want to remove the white spaces around (as you can see in the image there's a thick white spaces on every corner), how can I do that? It seems that it is created by default and needs something to do to remove that. I've tried to add margin: -10px but it looks like not the right way to do as it messes up the view on the below content.
Here's my code:
header, footer {
padding: 1em;
color: white;
font-family: "Calibri";
background-color: #000000;
clear: left;
text-align: center;
}
/* Navbar start */
ul.navbar {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
font-family: "Calibri";
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Change the link color to #111 (black) on hover */
li a:hover {
background-color: #111;
}
.active {
background-color: #009933;
}
/* Navbar end */
nav {
float: left;
max-width: 160px;
margin: 0;
padding: 1em;
}
nav li {
float: none;
}
nav ul {
list-style-type: disc;
padding: 0;
margin: 10px;
}
nav ul a {
text-decoration: none;
}
article {
margin-left: 170px;
border-left: 1px solid gray;
padding: 1em;
overflow: hidden;
}
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<h1>Header</h1>
</header>
<ul class="navbar">
<li><a href="#" class="active">Home</a></li>
<li><a href="#">Peripherals</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="#about">About</a></li>
</ul>
<nav>
<ul>
<li>Item1</li>
<li>Item2</li>
</ul>
</nav>
<article>
<h1>Item1</h1>
<p>Description for item1 here.</p>
</article>
<footer>Copyright (c) KPA</footer>
</body>
</html>