Home Forums Weaver Xtreme Theme Can’t Center An Amazon API Product Image

Topic Resolution: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #73758
    miamax
    Participant

    I have an Amazon product image created through the Amazon API Scratchpad.

    I cannot get this image centered on the page, it stays left-aligned no matter what I try.

    I would post the html here but it’s very long. Without changing the CSS (I don’t want to lose the affiliate tracking or get booted by Amazon) is there a way to center the whole thing?

    Thanks so much.

    https://www.dwellinthegarden.com/entryway-boot-tray

    #73762
    scrambler
    Moderator

    How are you inserting the Image?

    Because what ever method you are using is creating a float:left setting for the image container with the rule

    .paapi5-pa-ad-unit.pull-left {float: left;}

    This make me think there must be a centered option.

    If you cannot find the centered option, we can apply custom CSS to change it until their HTML changes….

    The rules below in the theme Global Custom CSS Rule box should do that

    .paapi5-pa-ad-unit.pull-left {float: none;}

    .paapi5-pa-product-container {margin:0 auto;}

     

    #73764
    miamax
    Participant

    I am inserting the image using the Amazon API for affiliates. (We used to be able to use Amazon’s SiteStripe which was super easy, but they have very recently removed that option and now all images must be inserted using their API.)

    The code is automatically generated by Amazon.

    The Custom CSS rules didn’t work, the image is still flush left.

     

    #73765
    scrambler
    Moderator

    You need to add important because of the CSS order

    .paapi5-pa-ad-unit.pull-left {float: none !important;}

    .paapi5-pa-product-container {margin:0 auto !important;}

     

    #73768
    miamax
    Participant

    That works.

    Thank you SO MUCH!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.