Well, just put that top margin for your content wrapper into a media query below the other CSS rules, similar to this:
@media screen and (max-width: 850px) {
.yourcontentdiv {
margin-top: 200px;
}
}
Well, just put that top margin for your content wrapper into a media query below the other CSS rules, similar to this:
@media screen and (max-width: 850px) {
.yourcontentdiv {
margin-top: 200px;
}
}
When my website goes to 850px it swaps to mobile design, the issue is that I have a button that appears on both desktop and mobile mode but when it’s at the beginning of mobile design which is 850 px the button is hidden under the header banner. I want to push the whole website’s main body content down. I can do this in desktop mode with the CSS property as – margin-top: 200px
and I am wondering if there is any @media
or any other type of code that can change this just for the mobile design.
I have found that if I put the code of <br>
it does change it but surely there is a better way than just having a few <br>
in the button code and even that will just change it for desktop design.
Sorry if my explanation doesn’t make much sense.
I will show my button code if this helps and if any other code is required to help can anyone just let me know.
<!--Button Code Start-->
<div class="quote-button-main">
<center>
<style>
.quote-button-main .button {
display: inline-block;
border-radius: 20px;
background-color: #45C236;
border: none;
color: #FFFFFF;
text-align: center;
font-size: 20px;
padding: 15px;
width: auto;
transition: all 0.5s;
cursor: pointer;
margin: 5px;
}
.button span {
cursor: pointer;
display: inline-block;
position: relative;
transition: 0.5s;
}
.button span:after {
content: ' 0bb';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
transition: 0.5s;
}
.button:hover span {
padding-right: 26px;
}
.button:hover span:after {
opacity: 1;
right: 0;
}
</style>
<a href="products.asp" <button class="button" style="vertical-align:middle"><span>CLICK HERE FOR A NO OBLIGATION INSTANT QUOTE!</span></button> </a>
</center>
</div>
<!--Button Code END-->
Once again thank you for any help!
Screenshot of Desktop mode:
Screenshot of Mobile Mode with the button that is hidden under the top banner:
can you provide an example produce your issue or screen shoot …
it swaps to mobile design
Yes, I can provide a screenshot and yes using media queries to make it switch to mobile.
Added two screenshots of desktop design first and then mobile design second to my post.
just add margin-top to taht button on desire screen size using media query
I tried this but it just changed it for desktop design, but I can try mess with it more to see if anything else I can think of might work.
seems like you are not addressing the right element (you didn’t post enough code to see which element that could be). Use the developer tools in mobile simlulation mode and try there to find the right element
Right, just tried it again and I don’t actually know what I was doing wrong as the code above was the same as mine just the pixel margin was set to 400px so that if it works It will be changed drastically to prove it worked sort of thing but it appears to be working now so, thank you haha