Row Containing 2 Buttons Not Displaying Well On Small Screens & Mobiles - Question | JoomShaper

Row Containing 2 Buttons Not Displaying Well On Small Screens & Mobiles

MM

marley man

SP Page Builder 1 day ago

I'm designing a new website: http://72.52.156.215/~themosquitoman/ I needed a large image on this homepage with text and 2 buttons on top of it, so I added an image to a section background, and then added a heading and a row with the 2 buttons on top of the section with the background image.

Unfortunately, when I shrink down the browser to a smaller size, those buttons get squeezed together instead of displaying them like button 1, then button 2 below button 1.

Can you explain how to correct this issue on smaller screen sized please? Thank you

0
23 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 21 hours ago #215895

Please use it inside Page Settings > Page CSS > Custom CSS

and only a new version of code.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215770

Hi,

Two Quick Tips:

  1. If you used two different Button addons, you can set also Margin (top/right/bottom/left) then it will help to have space between them, also on mobile view. No CSS hacks, just basic settings.
  2. Instead of using columns and two separate addons, you could use Button Group addon (LESS IS MORE)
0
MM
marley man
Accepted Answer
1 day ago #215775

Thanks Paul, but if I use a button group add-on, I wouldn't be able to display these two buttons side by side like I'm trying to mimic this homepage with their button side by side on top of their image: https://moshield.com/

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215780

in that case use tip No 1

If you need a video guide ping me tomorrow (+10h), I am going sleep now, sorry late hour.

BTW

As I saw on moshield they used extra CSS

@media (max-width: 767px) {
  .mos-btn-alt {
    width: 100%;
    max-width: 350px;
  }
}

to improve view on iphone. But also margin value for buttons.

0
MM
marley man
Accepted Answer
1 day ago #215782

You're awesome, will do, have a good evening!

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215808

as 1st step, for both buttons

those.png

you can use 10px

0
MM
marley man
Accepted Answer
1 day ago #215838

Hi Paul, I am already using 2 different button addons in a row. Just to confirm, that is the setup (#1) that you're suggesting right? inside a row? Thanks Janel

https://photos.app.goo.gl/xX6xjZL9fMJZfiDb6

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215839

yes , my today setup is/was for #1

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215841

2nd step. To make it "nice", inside internal Row add ID name (in Row settings), for example, action-buttons

info_3791_2026.jpg

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215843

3rd step, if you done 1 & 2nd as I asked.

Now we will grab an idea from moshield site.

@media screen and (max-width: 680px) {
#action-buttons  .sppb-btn {width: 100%;max-width: 320px;  display: block;}
}

as you see, this is still CSS basics. To be honest, using 3rd step (with extra margin value) you could replace first step. But it's worth to know how, and for is (1).

0
MM
marley man
Accepted Answer
1 day ago #215844

Paul, I've done all your steps so far...can you please clear your cache and let me know how these 2 buttons look on your smaller screen & Mobile? Thanks Janel http://72.52.156.215/~themosquitoman/

0
MM
marley man
Accepted Answer
1 day ago #215846

I did 2 and 3...added the action-buttons in the Section ID and then this below that in the Custom CSS: @media screen (max-width: 680px) {

action-buttons .sppb-btn {width: 100%;max-width: 320px;}

}

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215845

You still need to do 2 & 3 step exactly as told you.

But even now on mobile view I see 10px space between buttons.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215847

You added ID name in wrong Section, it was screenshot with red arrow !!!

and there is missing "and" here

@media screen and (max-width: 680px) {

No morning Coffee ?? ;) please look again, and correct mistakes.

0
MM
marley man
Accepted Answer
1 day ago #215848

You're absolutely right Paul...on both counts - wrong section and not enough coffee!!

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215849

2nd step OK, I see ID name in correct place.

0
MM
marley man
Accepted Answer
1 day ago #215850

And I did the 3rd step by adding the CSS you suggested below that int he Custom CSS field. Does it look good now to you?...thanks again Paul

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215851

about 3rd step, I see that extra CSS line is needed, becuase of your grid settings (I didn't see it before), so here is NEW step 3:

@media screen and (max-width: 680px) {
#action-buttons  .sppb-btn  {width: 100%;max-width: 320px; display: block; margin: 5px auto;}
 .sp-page-builder .page-content #action-buttons {width: 100%;}
 }

and you own me Orange juice, becuase I don't drink coffee.

AFTER on IPHONE info_3792_2026.jpg

0
MM
marley man
Accepted Answer
1 day ago #215853

I redid step 3...how bout a case of wine? :-)

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215854

After wine, I cannot write stright , hahaha

0
MM
marley man
Accepted Answer
1 day ago #215855

Agreed! Do the buttons and text above them look good on your small screen/mobile now?

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 day ago #215864

I don't see updated CSS code in action.

0
MM
marley man
Accepted Answer
1 day ago #215866

I'm positive that I added your updated CSS into the Custom CSS field below Section ID action-buttons inside "Buttons on Homepage Image"

0