| |

Divi – Center align Text in mobile view

If you want to show your content center align on mobile devices for some specific section then you can do this very easily via CSS.
add a custom CSS class of ts-center-text-mobile in Text Module settings

text-align-center in mobile view

and use this bit of CSS in Divi > Theme Options > General > Custom CSS section


/* Text align center in mobile view only */
@media (max-width:980px) {
.ts-center-text-mobile .et_pb_text_inner,
.ts-center-text-mobile .heading,
.ts-center-text-mobile .et_pb_button_module_wrapper {
text-align: center!important;
}
}

If you want to do this for entire website then no need to add any custom css class, just enter the following code :

/* Text align center in mobile view only */
@media (max-width:980px) {
.et_pb_text_inner,
.heading,
.et_pb_button_module_wrapper
{
text-align: center!important;
}
}

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *