How to make numbered rows inside a table BCCode Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
+2
Sanket
jawa
6 posters

    How to make numbered rows inside a table BCCode

    avatar
    jawa
    New Member


    Posts : 3
    Reputation : 0
    Language : english

    How to make numbered rows inside a table BCCode Empty How to make numbered rows inside a table BCCode

    Post by jawa December 5th 2009, 7:30 pm

    Hi I am interested in posting a table on my forums... it is in BBCode. But I would like to make the rows numbered, so that if i add another row, it will automatically give it the correct number.

    ex:
    #scorename
    1.lablahblah1
    2.lablahblah2

    ^ i put the number in their manually to show what i want.. how can i do this so it automatically numbers my rows?
    Sanket
    Sanket
    ForumGuru


    Male Posts : 48766
    Reputation : 2830
    Language : English
    Location : Mumbai

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by Sanket December 5th 2009, 8:52 pm

    I doubt if there is an automatic way of doing it.
    Rok
    Rok
    Energetic


    Male Posts : 6823
    Reputation : 234
    Language : idk

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by Rok December 6th 2009, 4:10 pm

    As Sanket stated above, I don't believe that there is any way to have the numbers appear automatically with each [tr]. The only way is to just add '1.' in each column. Or, maybe the [list=1] would work for that.
    avatar
    jawa
    New Member


    Posts : 3
    Reputation : 0
    Language : english

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by jawa December 6th 2009, 7:31 pm

    I tried fitting [LIST] in there, but it seems that list wont go through table rows, and if you put it outside the table rows, the list get sposted outside the table itself.... Unless yall know of a way to fit it in there :3 I'm a noob in coding
    Rok
    Rok
    Energetic


    Male Posts : 6823
    Reputation : 234
    Language : idk

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by Rok December 6th 2009, 9:14 pm

    Well, if the [*] list won't work, then I guess there's no other way but to just list numbers manually.
    Etana
    Etana
    Forumember


    Male Posts : 98
    Reputation : 0
    Language : French - English

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by Etana December 6th 2009, 11:25 pm

    Hello,


    This works but only on google chrome and safari :

    Code:
    [list=1][table border=1]
    [tr]
    [td][*]case[/td][td]case[/td]
    [/tr]
    [tr]
    [td][*]case[/td][td]case[/td]
    [/tr]
    [tr]
    [td][*]case[/td][td]case[/td]
    [/tr]
    [/table][/list]
    Result :

    1. case
    2. case
    3. case
    4. case
    5. case
    6. case

    On firefox, opera and internet explorer I don't thinks there is a way.

    Cordially.
    avatar
    jawa
    New Member


    Posts : 3
    Reputation : 0
    Language : english

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by jawa December 7th 2009, 5:01 am

    thank you :O too bad it doesn't work on everything Sad
    CharleX
    CharleX
    Forumember


    Male Posts : 492
    Reputation : 0
    Language : English and Korean
    Location : On The Comp

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by CharleX December 7th 2009, 5:34 am

    Oh man. I know how to do it in HTML, but not in BB code. Hem
    ankillien
    ankillien
    Energetic


    Posts : 5198
    Reputation : 129
    Language : English, XHTML, CSS, JS, PHP, SQL

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by ankillien December 7th 2009, 10:37 am

    Hello,
    You can use the following code for that.
    But it won't make table rows that produce number automatically :/

    Code:
    [list=1]
    [*]blah blah blah...list1
    [*]blah blah blah...list2
    [*]blah blah blah...list3
    [/list]

    Out put...


    1. blah blah blah...list1
    2. blah blah blah...list2
    3. blah blah blah...list3
    Etana
    Etana
    Forumember


    Male Posts : 98
    Reputation : 0
    Language : French - English

    How to make numbered rows inside a table BCCode Empty Re: How to make numbered rows inside a table BCCode

    Post by Etana December 7th 2009, 3:35 pm

    If you add in your CSS style sheet ( AP > Display > Colors > CSS Stylesheet ) :

    Code:
    table.numbered { counter-reset: line-number; } table.numbered td:first-child:before { content: counter(line-number) "."; counter-increment: line-number; padding-right: 0.3em; }
    And then in a post :

    Code:
    [table class="numbered"]
    [tr][td][/td][td]cell 1[/td][td]cell 2[/td][/tr]
    [tr][td][/td][td]cell 1[/td][td]cell 2[/td][/tr]
    [/table]
    That should work with other browser than IE ( because it use CSS2.1 properties that IE doesn't support ).

    Cordially.