Please I need help fixing this code to be responsive. It looks normal when in desktop browsers but on mobile devices the buttons does not work. below is the code I really need help to get this done.
.aos-animate.plan__tabs-row {
visibility: inherit;
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
.aos-animate.plan__tabs-row {
visibility: inherit;
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
.plan__tabs-row {
margin: 25px 0;
position: relative;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
visibility: hidden;
}
.plan__tabs-row {
margin: 25px 0;
position: relative;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
visibility: hidden;
}
<div class="plan__tabs-row aos-init aos-animate" data-aos="animation">
<div class="plan__tab-conteiner">
<button class="plan__pm-action check"><i></i> Precious Metals</button>
<button class="plan__real-action"><i></i>Real Estate</button>
<button class="plan__energy-action"><i></i> Energy</button>
<button class="plan__forex-action"><i></i>Forex</button>
</div>
</div>
2
Answers
To achieve responsive button design on mobile devices, you can employ media queries to tailor the appearance of your buttons when the screen dimensions are reduced. Here’s an illustration of how you can customize your code for this purpose:
This is merely an illustration; you can achieve even better results using
@media
queries.600px
for mobiles and768px
for tabletsThe best way to fix that is to create functions in your script:
HTML:
JS: