I want to make a basic HTML/CSS Website with a header and three columns below it. But I am not getting a proper alignment. Please help me rectify my code.
#menu_bar {
width: 1346px;
height: 60px;
margin: 0px;
padding: 0px;
background-color: black;
}
ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
li {
float: left;
text-align: center;
border: 4px black solid;
}
a:link,
a:visited {
display: block;
width: 120px;
color: #ffffff;
height: 30px;
padding: 10px;
background-color: #4169e1;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
}
a:hover {
background-color: #000080;
}
#icon {
border: none;
}
#first_col {
float: left;
width: 20%;
height: 708px;
background-color: grey;
}
#second_col {
float: left;
width: 60%;
height: 708px;
background-color: green;
}
#third_col {
float: left;
width: 20%;
height: 708px;
background-color: yellow;
}
<div id="layout">
<div id="menu_bar">
<ul>
<li id="icon">
<img src="blue.jpg" height="60" width="104">
</li>
<li><a href="#">Home</a>
</li>
<li><a href="#">Profile</a>
</li>
<li><a href="#">Messages</a>
</li>
<li><a href="#">Logout</a>
</li>
</ul>
</div>
<div id="first_col">
<p>hello</p>
</div>
<div id="second_col">
<p>post here</p>
</div>
<div id="third_col">
<p>friends</p>
</div>
<div>
The output in the browser comes like this


And please help me remove that space before the first column.
display:inline-block; vertical-align:top;and then make sure there is no whitespace between them.