• Resolved danielshalar

    (@danielshalar)


    Hey, I have this product page in Mobile viewpoint and i’m looking to center the Color, Connection and Size div classes to the center…

    I’m using a third party plugin for these variations called XT Variations but it does not have an option to center in mobile view.

    I’ve tried center aligning them but it did not work, any solutions?

    • This topic was modified 3 years, 2 months ago by danielshalar.
    • This topic was modified 3 years, 2 months ago by danielshalar.
    • This topic was modified 3 years, 2 months ago by danielshalar.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello

    Using CSS code you can center the text, for example you can use:

    @media only screen and (max-width:600px){
        td.label{
              text-align: center !important;
        }
    }

    You can add custom CSS code by going to WP Dashboard » Appearance » Customize » Additional CSS.

    Let us know if that worked for you.

    Thread Starter danielshalar

    (@danielshalar)

    Thank you for your reply @ihereira

    Unfortunately that did not center the text and buttons properly.

    You can see that the text is “centered” but not to the page width, same with the buttons and images they are not in the center.

    Like I said i’ve tried doing text-align: center to some of the classes but it gave me the same result as yours.

    Looking forward to get this fixed..

    • This reply was modified 3 years, 2 months ago by danielshalar.
    Saif

    (@babylon1999)

    Hello @danielshalar,

    I understand you want to centre the buttons too, here’s a modified CSS snippet.

    /*  Center option buttons on mobile  */
    
    @media only screen and (max-width:600px){
        td.label{
              text-align: center !important;
                }
    ul.xt_woovs-swatches {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
    }
    
    ul.xt_woovs-swatches li.swatch {
      margin: 5px;
    }
    }


    End result: https://d.pr/i/pHBdUD

    I should note that customizing third-party plugins are not within our scope of support so if you need more help with this it might be better to contact the plugin author directly. : )

    Cheers!

    Hi there!

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please start a new thread.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Centering problem’ is closed to new replies.