A web page has a Promo Box with text and a button. They look great on desktop, with the text aligned left and the button aligned right. But on mobile the left aligned text looks odd with the centred button.
How can the text be centred only on mobile, i.e., when the button becomes full width centred?
Hey Tanja,
Thank you for the inquiry.
You can use this css code to center align the promobox content on mobile view.
@media only screen and (max-width: 767px) {
/* Add your Mobile Styles here */
.avia-promocontent {
text-align: center;
}
}
If you need to apply a margin below the content to create some space, please use this instead.
@media only screen and (max-width: 767px) {
/* Add your Mobile Styles here */
.responsive .avia-promocontent {
text-align: center;
margin-bottom: 20px;
}
}
Best regards,
Ismael
This is perfect, thank you!