Align text for-mobile devices

SOLVE
tam1445
Participant

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!

0 Upvotes
1 Accepted solution

Accepted Solutions
Reg
Solution
Participant | Platinum Partner
Participant | Platinum 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

Reg Desgroseilliers
www.rdcoding.com

View solution in original post

1 Reply 1
Reg
Solution
Participant | Platinum Partner
Participant | Platinum 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

Reg Desgroseilliers
www.rdcoding.com

View solution in original post