1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problems with spacing on embedded code

Discussion in 'Troubleshooting and Problems' started by Lone Wolf, May 25, 2012.

  1. Lone Wolf

    Lone Wolf Well-Known Member

    I run a sports website and on vbulletin we used to use the code function to create game scorecards. We could use tabs in notepad to create a properly spaced scorecard as in the example below...

    Code:
    Purple vs. Green
     
     
    Green Innings
     
     
    Player                Status                        R    B    4s    6s    S/R
    Umar Akmal            lbw Abdul Razzaq              0    1     0    0    0
    Misbah ul Haq         c Abdul Razzaq b Omar        51    36    6    0    141.7
    Shan Masood            lbw Omar                    59    43    8    0    137.2
    Shakeel Ansar         c Omar b Abdul Razzaq        26    16    4    0    162.5
     
    Total: 175                    Overs: 20.0                Run Rate: 8.75
     
    Extras : 9    No Balls : 2      Wides : 4    Leg Byes : 3        Byes : 0

    However when I do the same thing on XenForo the spacing is all wrong as in the example below...

    Code:
    Purple vs. Green
     
     
    Green Innings
     
     
    Player                Status                        R    B    4s    6s    S/R
    Umar Akmal            lbw Abdul Razzaq            0    1    0    0    0
    Misbah ul Haq        c Abdul Razzaq b Omar        51    36    6    0    141.7
    Shan Masood            lbw Omar                    59    43    8    0    137.2
    Shakeel Ansar        c Omar b Abdul Razzaq        26    16    4    0    162.5
     
    Total: 175                    Overs: 20.0                Run Rate: 8.75
     
    Extras : 9    No Balls : 2      Wides : 4    Leg Byes : 3        Byes : 0

    In order to correctly space the second scorecard to resemble the first scorecard I have to individually edit the spaces on each line to make it match up correctly. This is really time consuming and I cant understand why it doesnt 'just work' like it used to on vbulletin.

    Does anyone know how to create correctly spaced (via tabs) scorecards with XenForo code the way I can with vbulletin.
     
  2. Lone Wolf

    Lone Wolf Well-Known Member

    PS - I know the totals dont add up it's an incomplete scorecard
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    What if you change the font in the editor to Courier New? Does it give you the desired effect more than if you used the [code] function?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The code block works the same in XF. I suspect this is a problem with the rich editor which is known to hijack formatting. Try using the plain text editor.
     
    Lone Wolf likes this.
  5. Lone Wolf

    Lone Wolf Well-Known Member

    Does that mean using the white button in the top left of the editor?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  7. Lone Wolf

    Lone Wolf Well-Known Member

  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Works for me:

    Code:
    		col1		col2		col3
    row1		a		b		c
    row2		d		e		f
    
     

Share This Page