I’ve been tasked with changing a website around a bit, and right now, the website has a responsive layout that is 95% of the viewports width, body-wise, so it will adjust if resized.
This is great, I want it to keep doing that, but I want the footer to have a side-to-side calm blue background, and I’m not able to come up with a way to do that for some reason.
Can anyone help?
bodycontains all the other elements. You thus aren’t supposed to have one larger thanbodyinside of it.Although you could position it absolutely to the bottom-left corner (
position: absolute; bottom: 0px; left: 0px;) with a width of100%and possibly make it work, I’d suggest you instead make a container element, perhaps adiv, inside of thebodyelement that contains your 95%-width elements and place the footer outside of that container.I am not sure of which method is more reliable, however.