www.webdeveloper.com
Results 1 to 7 of 7

Thread: Extra column in table BBCode

  1. #1
    Join Date
    Mar 2013
    Posts
    23

    Extra column in table BBCode

    Hi,
    On a hockey forum I am using the following code as a league table in a table format. However, as you can see, there is an extra column at the beginning.

    Does anyone know why this is happening and how it can be avoided?

    Cheers


    Preview:



    Code:

    Code:

  2. #2
    Join Date
    Mar 2013
    Posts
    23
    Well, it doesnt seem to be showing the code... Or allowing me to, typical.

  3. #3
    Join Date
    Mar 2013
    Posts
    23
    If you click "reply with quote" then you will see the code if it isnt already showing.

  4. #4
    Join Date
    Mar 2012
    Posts
    1,119
    Irrelevant comments deleted.
    Last edited by jedaisoul; 08-26-2013 at 02:57 PM.

  5. #5
    Join Date
    Mar 2013
    Posts
    23
    Quote Originally Posted by jedaisoul View Post
    Irrelevant comments deleted.
    Quote Originally Posted by jedaisoul View Post
    Your code needs validating. The tag <td> (table data) is only valid in <tr> (table row). Also:

    - Are you using a <!DOCTYPE> declaration, and, if so, which?

    - Why are you using [ ] braces instead of < >? How did you get the code to even run???.

    As I said, it's BBCode, I can't use HTML.

  6. #6
    Join Date
    Mar 2012
    Posts
    1,119
    Yes, I realized that my comments were irrelevant. That is why I deleted them.

  7. #7
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,207
    Quote Originally Posted by dmr123 View Post
    Hi,
    On a hockey forum I am using the following code as a league table in a table format. However, as you can see, there is an extra column at the beginning.

    Does anyone know why this is happening and how it can be avoided?

    Cheers

    Preview:
    PHP Code:

    [center]
    [
    table][td]#[/td][td]Team[/td][td]GP[/td][td]W[/td][td]L[/td][td]LO[/td][td] PTS[/td] 
    [td]1[/td][td][URL="www.belfastgiants.com"][COLOR="teal"]Belfast Giants[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]2[/td][td][URL="www.braeheadclan.com"][COLOR="purple"]Braehead Clan[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]3[/td][td][URL="www.cardiffdevils.com"][COLOR="red"]Cardiff Devils[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]4[/td][td][URL="www.coventryblaze.co.uk"][COLOR="skyblue"]Coventry Blaze[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]5[/td][td][URL="dundeestars.com"][COLOR="darkBlue"]Dundee Stars[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]6[/td][td][URL="www.edinburgh-capitals.co.uk"][COLOR="magenta"]Edinburgh Capitals[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td
    [
    td]7[/td][td][URL="fifeflyers.co.uk"][COLOR="blue"]Fife Flyers[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]8[/td][td][URL="hullstingrays.co.uk"][COLOR="grey"]Hull Stingrays[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]9[/td][td][URL="sheffieldsteelers.co.uk"][COLOR="teal"]Sheffield Steelers[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]10[/td][td][URL="www.panthers.co.uk"][COLOR="orange"]Nottingham Panthers[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [/
    table][/CENTER
    Code:

    PHP Code:
    [center]
    [
    table][td]#[/td][td]Team[/td][td]GP[/td][td]W[/td][td]L[/td][td]LO[/td][td] PTS[/td] 
    [td]1[/td][td][URL="www.belfastgiants.com"][COLOR="teal"]Belfast Giants[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]2[/td][td][URL="www.braeheadclan.com"][COLOR="purple"]Braehead Clan[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]3[/td][td][URL="www.cardiffdevils.com"][COLOR="red"]Cardiff Devils[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]4[/td][td][URL="www.coventryblaze.co.uk"][COLOR="skyblue"]Coventry Blaze[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]5[/td][td][URL="dundeestars.com"][COLOR="darkBlue"]Dundee Stars[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]6[/td][td][URL="www.edinburgh-capitals.co.uk"][COLOR="magenta"]Edinburgh Capitals[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td
    [
    td]7[/td][td][URL="fifeflyers.co.uk"][COLOR="blue"]Fife Flyers[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]8[/td][td][URL="hullstingrays.co.uk"][COLOR="grey"]Hull Stingrays[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]9[/td][td][URL="sheffieldsteelers.co.uk"][COLOR="teal"]Sheffield Steelers[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [
    td]10[/td][td][URL="www.panthers.co.uk"][COLOR="orange"]Nottingham Panthers[/COLOR][/URL][/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td][td]0[/td]
    [/
    table][/CENTER
    To get bbCode to show, wrap it in "php" tags. You're missing the bbCode "tr" tags. Working Example:
    Code:
    Name Age
    John 65
    Gitte 40
    Sussie 19
    bbCode used for working example:
    PHP Code:
    [table]
    [
    tr]
    [
    th]Name[/th]
    [
    th]Age[/th]
    [/
    tr]
    [
    tr]
    [
    td]John[/td]
    [
    td]65[/td]
    [/
    tr]
    [
    tr]
    [
    td]Gitte[/td]
    [
    td]40[/td]
    [/
    tr]
    [
    tr]
    [
    td]Sussie[/td]
    [
    td]19[/td]
    [/
    tr]
    [/
    table

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles