span, a).
Solution - display: inline-block; or display: block;#body {
background: url(../images/bg.jpg) top left repeat-y;
}#nav li {
list-style: none;
float: left;
padding: 0 15px 0 0;
}.main-inner div
1. Subtract padding & border from width
https://youtu.be/qhiQGPtD1PQ?t=137
2. Add inner div with padding
https://youtu.be/_Ai-_nZ6bw4?t=269
3. Use box-sizing: border-box property
https://codepen.io/Tandilashvili/pen/yLeJvLO.clearfix::after {
content: "";
clear: both;
display: block;
}Modern way of clearing floats<i style="display:block;clear:both"></i>div p {
background-color: yellow;
}Selects all <p> elements inside <div> elements.class1 .class2 h2{
color: red;
}Selects all <h2> elements within .class2 that is a descendant of .class1 elementh2 elements that has parent with both cl1 and cl2 classes.cl1.cl2 h2{
color: red;
}