- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
This is maybe a bit complicated to explain but…
I have set my left and right margins to 175px and the whole HTML document has been allocated with the colour code #EEEEEE. However, I want the whole of my footer to be #C5110B. When I code that currently, it only turns some of the footer that colour and leaves the margins as they were. I would like to know if there is a way to make the footer’s margins only this particular colour whilst leaving the remainder of the margins alone.
Thank you all in advance!
There’s lots of ways to do this.
The simplest is to remove the margins from the footer and take it out of any container it might be in…and one problem is solved.
If you want the content inside the footer to have those margins, wrap it all in a div and give that the margins you want.
Frankly, though, without actual code ideally in a minimal Codepen demo it’s hard to help further.
https://stackoverflow.com/questions/28565976/css-how-to-overflow-from-div-to-full-width-of-screen
Here is a css tricks article about it. There are a few methods:
https://css-tricks.com/full-browser-width-bars/