While attempting to ensure my subpar website is at least mobile-friendly, I've encountered a peculiar @media issue that continues to elude me.
For screen widths greater than 800px, the margin-top of my homebutton
linking back to the homepage with margin-top: 40vh
functions perfectly. To cater to narrower screens and mobile browsers, I included a media query in the CSS:
@media screen and (max-width: 800px){
h1#homebutton {
margin-top: 0;
font-size: 1em;
}
}
Despite incorporating various other @media rules on the page successfully, the margin-top
and font-size
directives for h1#homebutton
simply refuse to comply.