Archived topic
How do I make a responsive button like this?
7 replies · Started by Michael on December 19, 2019
I am wanting to create a responsive button, but seem to have trouble doing so.
I want one that is similar to the one on this site here where it says " I Want To Make Money Online!": https://youronlinerevenue.com/
Is there a way to do this with CSS or some other way?
Thank you
Hi there,
Yup CSS is the way.
Can you try doing this first?
https://docs.generatepress.com/article/adding-buttons/
Then link me to the site so I can tweak the CSS :)
Yep I have added a button as you said within the article, but when I look at it in mobile view it gets all distorted.
How can I fix this?
What do you mean it's all distorted?
This is what I'm seeing and it's normal:
https://www.screencast.com/t/o90ILeeCyhcZ
I want to have the button to where it stays in one line on mobile view like this:
Try this CSS to make the font size smaller so they fit in a narrow/mobile screen:
@media (max-width: 768px) {
.button.blue, .button.blue:visited {
font-size: 10px;
}
}
Where do I place that in the orginal code like this one here...
.button.sun-flower,
.button.sun-flower:visited {
background: #F1C40F;
color:#FFF;
}
.button.sun-flower:hover,
.button.sun-flower:active {
background: #E2B607;
color:#FFF;
}
Just copy and paste under your existing code should work.
Let me know :)