Archived topic
Aligning Desktop and Mobile Imgs Differently
5 replies · Started by Andrew on February 10, 2023
Sorry - I've read through the support and know this has been answered numerous times, so I cannot figure out why it is not working for me. I want to align mobile and desktop images differently, desktop right/left, all mobile center. I've created a child of my generate theme and added the following to me stylesheet. What am I missing?
@media(max-width: 768px) {
.wp-block-image figure.alignleft,
.wp-block-image figure.alignright {
float: none;
margin: 0;
}
.wp-block-image figure.alignleft img,
.wp-block-image figure.alignright img {
width: 20%;
}
}
Hi Andrew,
No need to apologize :)
Your site is currently under maintenance mode so I can't see why it isn't working.
Any chance you can disable it for now?
Let me know :)
Hi Leo, is there an easy way to do this? I did a search and found maintenance plugins are usually used to enable, I do not have a plugin currently installed. Thank you
Can you try editing this part:
.wp-block-image figure.alignleft,
.wp-block-image figure.alignright {
float: none;
margin: 0;
}
To this:
.wp-block-image figure.alignleft,
.wp-block-image figure.alignright {
float: none;
text-align: center;
}
Hah, that worked. Thanks Leo!
No problem :)