Hey there! I'm currently experimenting with creating a 3 column layout and running into an issue with the footer placement. I want the footer to go between the two sidebars at the bottom, but my middle column isn't extending all the way down like the sidebars. I don't want to use margin-left as a solution because I believe there must be a better way to achieve this alignment.
https://i.sstatic.net/dOaQi.png
This is what I have so far:
<!DOCTYPE html>
<html>
<head>
<title>First</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header></header>
<div id="first-column"></div>
<div id="middle-column"></div>
<div id="third-column"></div>
<footer></footer>
</body>
</html>
CSS:
html, body {
height: 100%;
margin: 0;
}
header {
background-color: #444444;
width: 100%;
height: 20%;
}
#first-column {
width: 15%;
height: 80%;
background-color: #d8d8d8;
float: left;
}
#middle-column {
width: 70%;
height: 70%;
float: left;
background-color: red;
}
#third-column {
width: 15%;
height: 80%;
background-color: #d8d8d8;
float: left;
}
footer {
background-color: #222222;
height: 10%;
width: 70%;
position: absolute;
bottom: 0;
margin-left: 100px;
}