0
margin-bottom not working in html/css
I have tried to make footer stick to bottom of the page but it is not working. If have tried many methods like display: block; I don't want to use position:fixed etc. because that will make the footer interfere with other contents as the page is long and scrolling is required.
6 Respuestas
+ 1
You can use
Position : absolute;
Bottom:0;
0
Shubham Sharma thanks.
What is the difference between bottom and margin-bottom. Why margin-bottom doesn't work in this case.
0
Margin-bottom takes space between self and its next element
Where bottom is not , it is realtive to the viewport.
0
Bottom property works if elements position is other than relative.
0
Shubham Sharma the method works but as my page is large so while scrolling (in mobile view) the footer interfere with other contents.
0
Please provide link of Document