css - Position absolute - chrome and firefox -



css - Position absolute - chrome and firefox -

i'm working on prestashop store http://vps110594.ovh.net/.

i have problem yellowish rectangle cost on product boxes above footer. bottom border of yellowish cost box should aligned top border of black box product name , "add cart" button. in chrome aligned, in firefox it's not. i've encountered problem before (there few pixels of difference between firefox , chrome when using position: relative , absolute), , decided apply inline styles firefox via js (maybe have other solutions?):

window.onload = browsername(); function browsername() { var browsername= navigator.useragent; var isfirefox = browsername.search("firefox"); if (isfirefox > 0) { var elems = document.getelementsbyclassname("cena_product"); var size = elems.length; (var = 0; < size; i++) { var box = elems[i]; box.style.bottom = "10px"; } } }

anyway on computer looks ok both in chrome , firefox, when checked on different computers yellowish box not aligned both on chrome , firefox (the same versions of browsers). why that?

i've made simple illustration of need: link.

it works same on all* browsers.

i suggest rewrite code, lead other bugs in future.

code example:

<li> <div class="item"> <div class="image"> <img src="http://vps110594.ovh.net/26-home_default/test.jpg" alt=""/> </div> <div class="buy"> purchase <div class="price">435$</div> </div> </div> </li>

*modern

css google-chrome firefox absolute relative

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -