Single Image - by aahmadi3 - on WordPress WooCommerce support

This topic has 8 replies, 3 voices, and was last updated 8 years, 11 months ago ago by Jack Richardson

  • Avatar: aahmadi3
    aahmadi3
    Participant
    June 5, 2015 at 01:12

    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.

    http://www.myclientweb2.com

    Please advise.
    Thanks.
    Ali

    7 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    June 5, 2015 at 07:13

    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.

    Avatar: aahmadi3
    aahmadi3
    Participant
    June 5, 2015 at 17:31

    That worked great for my mobile device but how about for the desktop?

    Avatar: Robert Hall
    Robert Hall
    Support staff
    June 6, 2015 at 07:28

    Hello,

    As I see it’s working perfect on desktop. Please see screenshot: http://prntscr.com/7dpmma

    Regards,
    Robert Hall.

    Avatar: aahmadi3
    aahmadi3
    Participant
    June 6, 2015 at 18:07

    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

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 8, 2015 at 08:09

    Hello,

    Try to add this code in custom.css:

    .wpb_single_image img {
      position: relative;
      left: 50%;
      margin-left: -150px;
    }

    Best regards,
    Jack Richardson.

    Avatar: aahmadi3
    aahmadi3
    Participant
    June 8, 2015 at 15:45

    Thank you Jack!

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 8, 2015 at 18:26

    Hello,

    You’re welcome.

    Best regards,
    Jack Richardson.

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘Single Image’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.