Comment coller le pied de page en bas de page?
-
-
Montrez du code.Show some code.
- 0
- 2017-10-18
- Samuel Asor
-
2 réponses
- votes
-
- 2017-10-18
Une recherche rapidemontre que cette question a étéposéeet répondueplusieursfois.
Depuis StackOverflow: Faire coller correctement lepied depage aubas de lapage
Depuis StackOverflow: Commentfaire coller lepied depage aubas de votrepage Web.
Àpartir de CSS-Tricks: 5façons différentes de créer unpied depage collant
Depuis Code Pen: Pied depage "Toujoursen bas"
Depuis WordPress: Commentfixer lepied depage aubas de l'écran?
J'ai utilisé la réponse WordPresspourma réponse:
.site-footer{ position: fixed; bottom: 0; left: 0; right: 0; }
A quick search shows this question has been asked and answered many times.
From StackOverflow: Make footer stick to bottom of page correctly
From StackOverflow: How to get the footer to stick to the bottom of your web page.
From CSS-Tricks: 5 different ways to make a sticky footer
From Code Pen: "Always on the bottom" Footer
From WordPress: How to make footer fixed to the bottom of the screen?
I used the WordPress answer for my answer:
.site-footer{ position: fixed; bottom: 0; left: 0; right: 0; }
-
J'aiessayé d'utiliser `absolu`en vain,lepassage à`fixe` afonctionné -mais cela signifie que le défilementgardera lepied depagefixe,ce quiest unpeunulI tried using `absolute` to no avail, changing to `fixed` worked - however it does mean scrolling will keep footer fixed, which kinda sucks
-
- 2017-10-18
Ajoutez du CSSpour votrepied depage,ilfixera laposition dupied depageen bas de lapage.
.site-footer{ position:fixed; bottom:0px; left:0px; right:0px; width:100%; }
Add CSS for your footer, it will fix the position of footer to the bottom of the page.
.site-footer{ position:fixed; bottom:0px; left:0px; right:0px; width:100%; }
-
Celafixera laposition dupied depageen basIt will fix the footer position to the bottom
- 1
- 2017-10-18
- HeroWeb512
J'aibesoin que lepied depage du site soitplacé aubas du site àtoutmoment.
Actuellement,il setrouveen bas du site lorsqu'il y a du contenu sur lapage,mais sans contenu sur lapage,il (.site-footer)monte dubas vers lemilieu de lapage visible comme représenté dans cetteimage:
J'aipu répondre àmapropre questionet publier leprocessus de découverte ci-dessous: