Footer to position himself when he has a lot of content and when he has a little

Asked

Viewed 31 times

-2

Hello, my footer ta with a small problem, when I have a lot of content on the site, it is well positioned at the bottom of the page, already when it has little content, it gets centered, wanted a way to make it auto position, when it has a lot of content it descends and when it has little content it also descend and not stay at the top.inserir a descrição da imagem aqui

The css I’m using on this footer is as follows: <footer style="display: flex; bottom: 0; background-color: #AEB0E6; width: 100%; text-align: center">

1 answer

-1

Try splitting the sections of your site with the Section tag, so one will always stay at the bottom of the other (you can also set it to be next to each other with simple css). something like that:

<html>
<body>
<section> header </section>
<section> main </section>
<section> footer </section>
</body>
</html>

dentro de cada section você pode colocar o conteudo referente a ela, ou chamar um arquivo html separado usando JavaScript ou Jquery(recomendo)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.