Hello!
I’ve inserted an image on a page, and it’s left-aligned, with the text on the right. However, when I view the site on my mobile phone, a small part of the text is on the left side. I would like this image to take the entire center of the page and the text would be below the image, on the cell phone. How to do this?
https://ialbrasil.com.br/teste/
Grateful!
]]>Edit the width below to suit your needs:
img {
display: block;
margin: auto;
}
@media (min-width: 480px) {
img {
display: inline;
}
}
Set the image to display block on mobile allows you to set the margin to auto (centres the image). Then above 480px sets the img element back to the default display: inline removing the effects of the margin.
~ Steven
]]>