Have you ever wondered why a footer
element mysteriously shrinks in height when the browser window is resized?
I attempted to create a fiddle with my code, but unfortunately, it's not replicable on JSFiddle so I won't be sharing it.
This is how my footer
code looks:
footer {
width: 100%;
height: 30px;
margin: 0 auto;
text-align: center;
margin-top: 7px;
background-color: silver;
}
The corresponding HTML for the footer is:
<footer>
<p>Copyright © 2014 –
<a href="~/Disclaimer">Disclaimer</a>
<a href="PrivacyPolicy">Privacy Policy</a>
<a href="TermsOfUse">Terms of Use</a>
</p>
</footer>
A couple of things to consider:
- Even after setting
min-height: 30px;
for thefooter
, it still seems to shrink unexpectedly. - All this troubleshooting has given me a headache.