Hi, how can I get the images to be center aligned on mobile as they are on desktop?
Hey DROR,
Please add a custom CSS class name “my_centered_image” to the images you like to center and add the below CSS :)
.my_centered_image {
right:50%;
transform:translateX(50%);
}
Best regards,
Vinay
That didn’t work.
The images should be aligned to the center as the image element has an alignment option. Why isn’t it working? Doesn’t that mean something is not OK with the theme? I shouldn’t need custom CSS for these images to be aligned correctly.
Right?
Hi,
I assure you there is nothing wrong with the theme. The existing custom CSS added to the child theme is conflicting with the alignment of the images. To find out which code it is you can right-click and inspect and remove the block of code which is affecting the image alignment.
Best regards,
Vinay
I didn’t find the code that was conflicting. And the code you gave me isn’t working. I also tried it with the !important rule.
Is there a different code I can use to fix this and make the images centered?
Hi,
Removing the below code from the child theme should fix the alignment issue
@media only screen and (max-width: 449px) {
.avia-image-container.avia-align-center .avia-image-container-inner {
width: 123.4% !important;
max-width: 130%;
left: 11.6%;
}
}
Best regards,
Vinay
That worked, thanks. But I have other issues now on mobile.
Hi bakbek,
Try adding this css code in Quick CSS (located in Enfold > General Styling):
@media only screen and (max-width:767px) {
#top .av-masonry-entry.av-masonry-entry {
left: 0 !important;
}
}
Hope it helps :)
Best regards,
Nikko
Thanks!
Hi,
Glad we could help. Let us know if you need further assistance :)
Best regards,
Nikko