I am trying to recreate the google site, for practice with CSS and HTML. I have a pretty good grasp on floats, and have my div elements where I want them to be. However, I've run into a few problems. (Note, the colors are just to help me track the div while I'm practising, I will end up changing that)
This is what I'm getting.
My questions are 1, where are the margins coming from, as i have not set any, and 2, where is the extra padding on the left side of the ul coming from, I want to get rid of the empty space.
#google-logo {
height: 100px;
width: 100px;
float: left;
background-color: gray;
}
div {
box-sizing: border-box;
}
header {
height: 100px;
}
#searchbar, #navbar {
height: 50px;
float: left;
background-color: blue;
width: 600px;
}
#navbar {
clear: left;
background-color: red;
padding: 0 11px;
}
#encompass {
box-sizing: border-box;
height: 100px;
float: left;
}
li {
display: inline-block;
padding: 5px;
}
ul, li {
height: 50px;
box-sizing: border-box;
margin: none;
}
<header>
<div id="google-logo"></div>
<div id="encompass">
<div id="searchbar"></div>
<div id="navbar">
<ul style="float: left;">oof
<li>Home</li>
<li>Images</li>
<li>Idk</li>
</ul>
<ul style="float: right;">
<li>Settings</li>
<li>Account</li>
</ul>
</div>
</div>
</header>