My question pertains to the alignment of an advertisement (on the left as a banner) and content sections on my website. I have noticed that as the screen size increases, the distance between these two areas also increases. How can I ensure that the distance remains consistent across all screen sizes?
I have attempted to use @media queries in the following manner:
@media only screen and (max-width:1024px) {
.leftbanner {
padding-left: 15px;
}}
@media only screen and (max-width:1366px) {
.leftbanner {
padding-left: 85px;
}}
However, this approach does not seem to be working effectively for all screen sizes as I had hoped. Is there a simpler way to achieve the desired result?