This topic has 8 replies, 3 voices, and was last updated 8 years, 11 months ago ago by Jack Richardson
Hello,
How do I center single images for both desktop and mobile devices?
I want to center the 3 boxed images on my homepage on all devices.
Please advise.
Thanks.
Ali
Hello,
Please add the following code in custom.css file
@media (max-width: 767px){
.wpb_single_image img {
position: relative;
left: 50%;
margin-left: -150px;
}
}
Here is a video tutorial how to create custom.css: https://www.youtube.com/watch?v=Qok2zRedRMY&feature=youtu.be.
Regards,
Robert Hall.
That worked great for my mobile device but how about for the desktop?
Hello,
As I see it’s working perfect on desktop. Please see screenshot: http://prntscr.com/7dpmma
Regards,
Robert Hall.
Hi Robert,
It is not. If you look at the 3 icons below with the text those are perfectly centered.
The single images are being aligned to the left for desktop.
Please advise.
Thanks.
Ali
Hello,
Try to add this code in custom.css:
.wpb_single_image img {
position: relative;
left: 50%;
margin-left: -150px;
}
Best regards,
Jack Richardson.
Thank you Jack!
Hello,
You’re welcome.
Best regards,
Jack Richardson.
The issue related to '‘Single Image’' has been successfully resolved, and the topic is now closed for further responses