Сделать так, чтобы div всегда оставался внизу содержимого страницы, даже если есть полосы прокрутки.CSS

Разбираемся в CSS
Ответить Пред. темаСлед. тема
Гость
 Сделать так, чтобы div всегда оставался внизу содержимого страницы, даже если есть полосы прокрутки.

Сообщение Гость »


I am looking to implement the opposite behaviour to the following question: CSS Push Div to bottom of page. I.e., when content overflows to the scrollbars, I would like the footer to be at the bottom of the page, like Stack Overflow.

I have a div with id="footer" and the following CSS:

#footer { position: absolute; bottom: 30px; width: 100%; } This moves the div to the bottom of the viewport - but the element stays there even when you scroll the page down, so it is no longer at the bottom.

How can I make sure the div stays at the bottom of the page's contents even when the content overflows? I'm not looking for fixed positioning, only for the element to be at the bottom of all content.

Image:
Изображение



Источник: https://stackoverflow.com/questions/882 ... -are-scrol
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «CSS»