Answer the question
In order to leave comments, you need to log in
Responsive layout with fixed elements?
It is necessary to make sure that the top bar is pressed to the top, the footer, respectively, to the bottom, but the footer and the main content block must be rubber, that is, the footer can grow in height, but the content block must be pressed to it, in turn, the content block can grow and then the main scroll should be enabled.
There is the following markup:
<div class="top-bar"></div>
<div class="content"></div>
<div class="footer"></div>
.top-bar{
height: 40px;
width: 100%;
position: fixed;
}
.content{
height: 100%;
width: 100%;
}
.footer{
height: auto;
width: 100%;
position: fixed;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question