Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
DECISION!
<body>
<header>...</header>
<section class="main-content">...</section>
<footer>...</footer>
</body>
html{
height: 100%;
}
body{
display: flex;
flex-direction: column;
height: 100%;
}
header{
flex: 0 0 auto;
}
.main-content{
flex: 1 0 auto;
}
footer{
flex: 0 0 auto;
}
The first div is most likely a wrapper that defines the borders. The basement, most likely, was not placed there.
If the footer is highlighted correctly with the footer tag, just add a class to it with the name of the wrapper, or place it inside the tag. Or better yet, show the full code. To say for sure.
You can do it this way: https://codepen.io/castlejq/pen/ZEQoeyR
Wrap the content in classes with specific styles (sizes).
If you don't want to spend time on this, you can try bootstrap . And advice to you, try not to use id="" unnecessarily in your code, replace them with class="".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question