Community Forums 

Main Content

Re:Cart thumbnail formatting

    Jun 17 2014 23:45:12

    #1

    Geoff

    Join date : 2008-09-18      Posts : 415

    The product thumbnail image is constrained within its own td and its position cannot change. However other tds which would include the td containing the product text adjacent to the thumbnail can be accessed with javascript and their vertical alignment changed dynamically on page load.

    Copy the following code either in the header box in Cart setup / Header message box or if you have a premium cart and you're using a template, then it can be placed within the head section of your template.

    <script>function x(){y=document.getElementsByTagName("td");for(var i=0;i<y.length;i++){z=y[ i ];z.setAttribute("valign","top");}}onload=x;</script>

    (You could alternatively have "middle" if preferred.)