style product characteristics only once

  • Posts: 1057
  • Thank you received: 11
10 years 9 months ago #145129

Hello, i have the following

88.198.83.58/~filipaio/mastrogiorgos3/in...d&Itemid=818&lang=el

and i have created individual styles in css to give a "size background image" in every size (XXL,XL, L, M, S)

is it possible to add something in hikashop core to style characteristics only ONCE? As far as i can see every characteristic is styled like this:
(***)
#hikashop_product_characteristic_31-lbl,
#hikashop_product_characteristic_32-lbl,
#hikashop_product_characteristic_34-lbl,
#hikashop_product_characteristic_35-lbl,
#hikashop_product_characteristic_36-lbl
{
...some property
}
(***)

but, when i add a new product the #id (which is produced automatically) will be #hikashop_product_characteristic_xx-lbl. So then i have to style every time each set of new characteristics in css. The problem is that i don't know when a customer will decide to add a new product. If he does then the new id's will be different from the ones i initially created (***), and thus i'll have to add all the new id's
in css like this:

#hikashop_product_characteristic_xx-lbl,
#hikashop_product_characteristic_xx-lbl,
#hikashop_product_characteristic_xx-lbl,
#hikashop_product_characteristic_xx-lbl,
#hikashop_product_characteristic_xx-lbl
{
...same properties as above
}

Instead it would be really helpful if i could use something like this:

<span data-size="XL">XL</span>
<span data-size="L">L</span>
<span data-size="M">M</span>
<span data-size="S">S</span>

this way i can put in my css only the following, and only ONCE:

span[data-size="XL"] {
...some property
}

span[data-size="L"] {
...some property
}

etc...

Thanks in advance

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #145141

Hi,
I think that the best solution will be to use your CSS code through this kind of CSS ID:

#hikashop_main_image_div_4_10, #hikashop_small_image_div_4_10 {
Your CSS code
}
Note that the number 4 for is link to the value of your "ΜΕΓΕΘΟΣ" characteristic and the number 10 to the value of your "ΧΡΩΜΑ" characteristic.

Please Log in or Create an account to join the conversation.

Time to create page: 0.047 seconds
Powered by Kunena Forum