I am facing an issue where my website switches to mobile design at 850px, but the button I have on both desktop and mobile mode gets hidden under the header banner when it transitions to mobile design. I want to adjust the main body content of the website by pushing it down. On desktop mode, I can achieve this using the CSS property margin-top: 200px
, but I'm looking for a solution specific to mobile design, possibly using @media
queries or other code.
I tried adding <br>
tags to address the issue, but I believe there must be a more efficient way than inserting multiple line breaks in the button code. Additionally, these changes only seem to affect the desktop design.
Apologies if my explanation is unclear. If needed, I can provide the button code along with any additional code required for assistance.
<!--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: '\00bb';
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-->
If anyone can assist with a better approach, I would appreciate it!
Screenshot of Desktop mode: https://i.sstatic.net/b1MTG.png Screenshot of Mobile Mode with the button that is hidden under the top banner: