CMS Development

jcsully24
Member

Hide CTA at Mobile

Hello - looking for some CSS code to hide our header CTA at mobile and tablet site wide. 

 

thx,

james

0 Upvotes
2 Replies 2
Anton
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Hide CTA at Mobile

Hi @jcsully24

a link to your page would be nice. 

 

You can try following "workaround":

- give the cta a unique css class like "hidden-cta"

- go to your main css file and add a desired media query like

@media screen and (max-width : 1024px){
.hidden-cta{display:none;}
}

you can change the "max-width: 1024px" but I don't recomend that, if you not 100% sure what you're doing. 

Also you cann add more specific media query elements after

(max-width : 1024px)

like 

and (orientation : landscape)

 

Here some usefull ressources:

Media Queries on Github

Media Queries on W3School

Media Queries on Bootstrap2 (HubSpot still got a Bootstrap2 core)

Media Queries on CSS-Tricks

 

 

regards,

Anton

Anton Bujanowski Signature
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hide CTA at Mobile

@jcsully24 - can we get a link?

0 Upvotes