The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Enumerate Products

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #30786

    Hi everyone.

    I trying to find the best way to enumerate products.

    In my page i have the products separeted by:

    (Product #1)
    (Product #2)
    (Product #3)

    What i want is to add this code inside each div with ‘produto’ class:

    And var $number should increase with each div ($number +1) etc.

    What is the best way to do this? Thanks

    Rob MacKay

    Something like:

    $count = 1;

    while($count <= 10) { // while $count is less than or equal to 10.

    echo "

    $count++; // adds 1 to the count.


    Hopefully this should give you an idea.


    Yes, thanks. But how can i add some code inside all divs with ‘producto’ class in page?


    Rob MacKay

    if it is already created you need to do it with Javascript.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.