This is my footer styled as shown below, but it does not fill the full width of the page. I tried changing the width property to max-width, but it didn’t solve the issue. I noticed that I can still scroll across my page, which shouldn’t be the case. Any help would be greatly appreciated!
.footer {
width: 100%;
margin-top: 150px;
left: 0;
bottom: 0;
background-color: #ffe7e8;
}
3
Answers
Try adding
position
property to your CSS code andpadding
property to give your footer some spacing.I tested it myself and got the same.
I believe most browsers apply default padding and margin to the <body> tag.
To remove the padding/margin applied by default, try the following in your css file:
That resolved it for me anyway.
Try adding
overflow: hidden;
This will get rid of the scrolling bars for that element.