Text align different for Mobile

Hello, I was wondering how I would be able to make the text alignment different for things when the website goes mobile. Is there custom CSS I can do or create a class? Also how do you create a class exactly to do this? Thanks.

Hi There @jgreenberg

Thanks for writing in! You can use custom CSS to achieve this. For example, you can assign a unique class to your element my-custom-alignment.

Then you can add a custom CSS rule into your page.

@media(max-width:480px){
  .my-custom-alignment{
    text-align:right;
  }
}

Hope that helps.

Thank you so much! Worked like a charm! This makes complete sense to me and took me no time at all! Hopefully I can use this as a template for future classes as well! :grin:

Hi there,

You’re most welcome.

You may check these links for reference:
https://www.w3schools.com/css/css3_mediaqueries_ex.asp
https://www.w3schools.com/CSSref/sel_class.asp

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.