Hola! ¡Tenemos nuestra Comunidad en Español!

Align text for-mobile devices

SOLVE
Occasional Contributor

Is there a way to adjust mobile styles so that specific text is left-justified on desktop but centered on mobile devices?

 

I'm trying to do this for the blue copy in this email:

http://info.6monthsmiles.com/-temporary-slug-27a3d667-167c-49a9-a0fe-9810d15a1a88?hs_preview=OEDMDNw...

 

thanks!

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Reg Regular Contributor | Diamond Partner
Regular Contributor | Diamond Partner

You would need to add a media query and a class to the text you want centered. You can add the class by clicking the cog to edit css declarations and add it to the custom css class box.

 

centered-text-class.png

 

For example the media query would look like this:

 

<style>

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

 

.centered-mobile p{

text-align:center;

}

}

</style>

 

In this example any paragraph tags within the class .centered-mobile will be center aligned on devices smaller than 479px.

 

Cheers,

Reg

1 Reply 1
Reg Regular Contributor | Diamond Partner
Regular Contributor | Diamond Partner

You would need to add a media query and a class to the text you want centered. You can add the class by clicking the cog to edit css declarations and add it to the custom css class box.

 

centered-text-class.png

 

For example the media query would look like this:

 

<style>

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

 

.centered-mobile p{

text-align:center;

}

}

</style>

 

In this example any paragraph tags within the class .centered-mobile will be center aligned on devices smaller than 479px.

 

Cheers,

Reg