Oct 25, 2018 5:04 PM
I have an image and text grouped with in a module, I have an identical module next to this. In mobile I want the modules to stack center but not the individual layers within the module.
Can someone help me?
text-align:center; is not working
Nov 1, 2018 4:01 PM
Have you applied the text-align property to the parent? Try also using the margin property. For example:
.parent {
text-align:center;
}
.child {
margin: 0 auto;
}
Nov 26, 2018 12:22 PM
Sadly that is not working.
Nov 26, 2018 1:21 PM
@jaqigibson, you can use media queries in email. you cannot use flex.
do you have a preview link for the email?
Nov 26, 2018 1:27 PM
Nov 26, 2018 1:44 PM
@jaqigibson, unsure how you originally built this, but if there is a way to add a class to the three rich text modules, that would make it cleaner. Otherwise, you will need to target each by their ID. here is what it would look like for the flying if you have to use the ID. if you can add a class, substitute it for the id
@media (max-width: 480px){ #hs_cos_wrapper_module_15409446881632902_ div { text-align: center !important; } }
Nov 26, 2018 1:25 PM
Thanks for clarifying. I meant to specifiy inline.
Oct 29, 2018 12:10 PM
Hey @jaqigibson,
The more details, links, examples, and screenshots that you can include the better the Community can assist.
Once we have more information, we can try to help out.
Thanks,
Jenny
Nov 26, 2018 12:20 PM
Here is the desktop version looking how I want it to look,
Here is the mobile version not being centerd.
Is there a way to center the left justified text on the page while remaining left justified?
Nov 26, 2018 12:24 PM - edited Nov 26, 2018 12:34 PM
Another idea is to use FlexBox. Check out this link for more details.
.parent {
display: flex; /* or use inline-flex */
justify-content: space-between /*or use center*/
}
Please post the relevant HTML or CSS and I can modify in browser...
Nov 26, 2018 12:22 PM
If you still want the text aligned left but want to center the text block try adding some margins.
Nov 26, 2018 12:57 PM
Is there a way for the text to be left aligned for the desktop email but centered on mobile email?
Nov 26, 2018 1:10 PM
I did not realize you were creating an email. Thought it was a website. Your best bet for emails is using tables. It is not possible to use media queries.
Nov 26, 2018 1:06 PM
Yes. Use CSS media queries to alternate styles between desktop and mobile. Here are the basics.
Nov 26, 2018 1:07 PM
Even though emails should not use CSS style sheets rather should use inline styling?