Jump to content

element.style


Recommended Posts

There is an "element.style" in Prestashop and can't locate which file has it.
It's actually used in the product page, styling the size area for small thumbnails beneath the bigger product photo
which I'm trying to customize.
I just can't find where is element.style located, didn't find it in the global.css...
any help much appreciated.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

If you mean that:
http://www.abload.de/img/thumbs_list_frame.elemhfgw.jpg

Here is the solution:

>Search "thumbs_list_frame" (4 hits in 2 files) (search done with notepad++)
 C:\Users\kkk\Downloads\prestashop-german-edition-1311-6\themes\prestashop\js\product.js (3 hits)
   Line 308:     $('#thumbs_list_frame').scrollTo('li:eq(0)', 700, {axis:'x'});
   Line 318:         $('#thumbs_list_frame').width((parseInt(($('#thumbs_list_frame >li').width())* i) + 3) + 'px'); //  Bug IE6, needs 3 pixels more ?
   Line 318:         $('#thumbs_list_frame').width((parseInt(($('#thumbs_list_frame >li').width())* i) + 3) + 'px'); //  Bug IE6, needs 3 pixels more ?
 C:\Users\kkk\Downloads\prestashop-german-edition-1311-6\themes\prestashop\product.tpl (1 hits)
   Line 114:             </pre>
<ul>



The interesting part is in product.tpl:
width: {math equation="width * nbImages" width=80 nbImages=$images|@count}px

In the end it looks like:
width: 12345px
because the part in {} is only an equation and results in a number

The width, which is set to 80px is multiplied with the number of images nbImages thas is calculated from $images.

you could just hardcode that width but it has some flaws then. Better you use at least the number of images nbImages to set your width. i.e.:
width: {math equation="width * nbImages" width=120 nbImages=$images|@count}px
for 120px large previewpictues.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...