I found if the length and height of #products li h2 and #products li h3 are different in three column display mode, the products pictures will not be aligned well. How can I solve this problem ??
To hide the pagesTree in css in like to "sweep this under the carpet". Setting a bigger static height for h3 doesn't solve the problem too. You have to set the height dynamic, depending on length (height) of the h3 on every sub/page. With php - no chance. So we have to help us with js. In the pages_default.tpl add a class in the mentioned h3 element. <h3>$aData[sPages]</h3> change to: <h3 class="heightH3">$aData[sPages]</h3> Now, we can recognize this h3-element, even if there are another h3 on the page. Create function equalHeightH3() in common.js function equalHeightH3(){ // we search all h3 elements var allElems=document.getElementsByTagName('h3'); var iMaxH=0,iMaxTemp=0; // now we search the highest h3 with class="heightH3" for(var i=0;i<allElems.length;i++){ var thisElem=allElems[i]; if(thisElem.className&&thisElem.className.search(/heightH3/)!=-1){ iMaxTemp=thisElem.getBoundingClientRect().bottom-thisElem.getBoundingClientRect().top; if(iMaxTemp>iMaxH) iMaxH=iMaxTemp; } } //now we set this biggest height to all h3 with class="heightH3" for(var i=0;i<allElems.length;i++){ var thisElem=allElems[i]; if(thisElem.className&&thisElem.className.search(/heightH3/)!=-1) thisElem.style.height=iMaxH+'px'; } } // end of function equalHeightH3
Now we have to call this funcion loading the page with products: In pages_default.tpl direct under: <!-- BEGIN PRODUCTS --> put: <script type="text/javascript"> <!-- AddOnload(equalHeightH3); //-->
Thats all. The same procedure is to do with li element, if you want to get the same height of products containers. It helps then to set the position of basket-button and price.