[Resolved] Banner Positioning to Center – Need help to update the code

Home Forums Support Banner Positioning to Center – Need help to update the code

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #1331084

    Created an element hook and placed the code. am able to see the code but it is not center aligned

    Tried “center”, “aligncenter”, its not working

    <div class="alignleft">
         <script type="text/javascript">
           	amzn_assoc_ad_type = "banner";
    	amzn_assoc_marketplace = "amazon";
    	amzn_assoc_region = "US";
    	amzn_assoc_placement = "assoc_banner_placement_default";
    	amzn_assoc_campaigns = "amazonhomepage";
    	amzn_assoc_banner_type = "rotating";
    	amzn_assoc_p = "48";
    	amzn_assoc_width = "728";
    	amzn_assoc_height = "90";
    	amzn_assoc_tracking_id = "XXX";
    	amzn_assoc_linkid = "XXX";
         <script src="//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1"></script>
    Customer Support

    Hi there,

    Try adding this CSS:

    #amznBanners_assoc_banner_placement_default_0_img {
        margin: auto;

    It is not working. I added the code in the additional CSS and it is still in the same left aligned position


    Added a center tag and it is working. trying to fit with the header container size but when i increase the width it again tries to align left. how to fit it to the header container ?

    <iframe src="//rcm-na.amazon-adsystem.com/e/cm?o=1&p=48&l=ur1&category=amazonhomepage&f=ifr&linkID=d49dc17e8d25b8445cf65e28e00e59&t=testt-20&tracking_id=testt-20" width="1028" height="90" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>


    Customer Support

    You can do this:

    <div class="grid-container banner-container">
    <!-- your banner code here -->

    And use this CSS to center it:

    .banner-container {
        text-align: center;

    Not working, the banner is in the center now but not similar to the container above (header) it due which it now is in a separate container on its own which does not look good.


    Moved the position to “After header content” now. I think this should be fine now as long as it is inside the container with the header and not hanging separately which does not look nice.

    Customer Support

    Glad to hear you found a solution

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