CMS Development

tam1445
Participante

Align text for-mobile devices

resolver

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 Me gusta
1 Soluciones aceptada
Reg
Solución
Colaborador | Partner nivel Elite
Colaborador | Partner nivel Elite

Align text for-mobile devices

resolver

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

Ver la solución en mensaje original publicado

3 Respuestas 3
WSpecs
Miembro

Align text for-mobile devices

resolver

No, there isn't.

0 Me gusta
Reg
Solución
Colaborador | Partner nivel Elite
Colaborador | Partner nivel Elite

Align text for-mobile devices

resolver

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
WSpecs
Miembro

Align text for-mobile devices

resolver

No. This won't work.

0 Me gusta