CMS Development

kjavan05
Member

CTA not resizing on mobile

SOLVE

I am currently working on building out some landing pages and I have noticed when I check how they look on mobile, the CTAs don't resize. I am not a developer and am relying on the templates that were created for our account and just trial and error on my end. I am hoping there is an easy css fix or something to make them resize on mobile. Please help!

 

Screen Shot 2019-08-21 at 5.19.07 PM.png

0 Upvotes
1 Accepted solution
derekcavaliero
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

CTA not resizing on mobile

SOLVE

Hey @kjavan05 

 

Seems like you just need a max-width: 100%; CSS property added to the Custom CSS under the CTA's "Advanced Settings" panel inside the CTA editor:

 

(Note that this screenshot was taken from a CTA in a portal I have access to)

 

Screen Shot 2019-08-24 at 8.37.02 AM.png

Do not copy the rules from my the screenshot above - the screenshot is just a means to show you where to add the max-width: 100%; value.

 

That should keep your CTA from expanding past its parent container. A better means of doing this would be to add a common class to your CTAs and put that rule inside a CSS file on the site to make editing CTA styles easier (if you ever need to update 100's of them at once).

 

Hopefully that helps.

Derek Cavaliero
Director of Engineering

WebMechanix
www.webmechanix.com

View solution in original post

0 Upvotes
4 Replies 4
derekcavaliero
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

CTA not resizing on mobile

SOLVE

@kjavan05 

Do you have a page where we could see this issue? There's likely a CSS fix that can be done.

Derek Cavaliero
Director of Engineering

WebMechanix
www.webmechanix.com
0 Upvotes
kjavan05
Member

CTA not resizing on mobile

SOLVE

@derekcavaliero 

Here is a link to the referenced landing page: https://marketing.fleetsmith.com/fully-automated-mdm-0

0 Upvotes
derekcavaliero
Solution
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

CTA not resizing on mobile

SOLVE

Hey @kjavan05 

 

Seems like you just need a max-width: 100%; CSS property added to the Custom CSS under the CTA's "Advanced Settings" panel inside the CTA editor:

 

(Note that this screenshot was taken from a CTA in a portal I have access to)

 

Screen Shot 2019-08-24 at 8.37.02 AM.png

Do not copy the rules from my the screenshot above - the screenshot is just a means to show you where to add the max-width: 100%; value.

 

That should keep your CTA from expanding past its parent container. A better means of doing this would be to add a common class to your CTAs and put that rule inside a CSS file on the site to make editing CTA styles easier (if you ever need to update 100's of them at once).

 

Hopefully that helps.

Derek Cavaliero
Director of Engineering

WebMechanix
www.webmechanix.com
0 Upvotes
kelseygalarza
Contributor | Diamond Partner
Contributor | Diamond Partner

CTA not resizing on mobile

SOLVE

I'm not even sure these CTAs have this anymore? Can't figure out how to solve this problem now.

0 Upvotes