The Fastest and Shortest Solution:
Fastest and dirty solution to solve this, would be to apply a position:absolute;
(read about positions), at the footer
. However I am not 100% sure that it will solve the problem as it will depend on various aspects, such as styles applied to elements prior to this element, etc.
It will also be necessary to implement a margin-bottom
at the body
or the element wrapper/container that 'secures' all content, depending on the size of the footer
to prevent the contents of the body being superimposed by footer
.
In other words - A margem-bottom
the content of the body of the site, should be equal or greater to the size height
of footer
footer {
width: 100%;
margin: 0 auto;
font-family:Gabriola;
font-size:25px;
color:rgba(255,255,255,1);
background: rgba(73,155,234,1);
background-size:cover;
box-shadow: 0px 0px 0px 4px rgba(53,135,214,1);
position:absolute; /* Adicionada a propriedade 'position absolute' */
}
However this may not be the best way (actually it is not) or the most appropriate to fix it, as it may overlap with other elements and cause a bad user experience if they are not applied properly.
Then the best way is to take the whole element footer
and change it, ie move it out of the container/wrapper that holds all the content. I have created here a brief example of what is happening and what you can do to solve it.
Examples:
It depends on how your document is, that
width: 100%
is relative to where that element is. It is in the<body>
or within another element?– Renan Gomes
Renan, this error was happening because of a height:100%; inside the body, when I removed it was perfect! I’m not sure why this 100% height caused this, I don’t understand much about html! But thanks to everyone who tried to help me!
– Raizant