Reputation: 3460
How do I get sticky footer with ReactJS using Material UI. I tried this but not sticking to the bottom.
export default function Footer() {
return (
<footer style={{color: "gray"}}>
<center>Copyright ...</center>
</footer>
)
}
Looks like there is no native support in materialui. Will be good if the solution does not use boostrap.
Upvotes: 1
Views: 15210
Reputation: 501
You can make your footer sticky with something like this
export default function Footer() {return (
<footer style={{color: "gray", position: "fixed", bottom: 0}}>
<center>Copyright ...</center>
</footer>
)}
Upvotes: -2
Reputation: 149
This works for you
export default function Footer() {
return (
<footer className="sticky bottom-0">
<center>Copyright ...</center>
</footer>
)
}
Upvotes: -1
Reputation: 12807
You should use position fixed
for footer:
<footer style={{color: "gray", position: "fixed", bottom: 0}}>
<center>Copyright ...</center>
</footer>
Upvotes: 8