Code Box

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by Conor, Mar 8, 2005.

  1. Conor

    Conor New Member

    Messages:
    3,570
    Likes Received:
    0
    Trophy Points:
    0
    I need a code for a code box so I can place code on my site. I want it to be like this:

    PHP:
    This is what I wantSee the box?
    Anybody got one?
     
  2. Chris

    Chris New Member

    Messages:
    1,538
    Likes Received:
    0
    Trophy Points:
    0
    Got one on my website at alac.x10hosting.com.

    Code:
    <textarearows=4 cols=35>BLAH THIS IS INSDIE</textarea>
    I believe it is the same thing as the [ code ] tags... just the code tags here are formatted to make it not look like one.

    Edit: nevermind... but you can edit it to not look like a textarea.
     
  3. Jim

    Jim New Member

    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    <div style="border: 1px solid black; width: 640px; font-family: Courier;"><pre>codehere</pre></div>
    
    Try that.
     
  4. Chris

    Chris New Member

    Messages:
    1,538
    Likes Received:
    0
    Trophy Points:
    0
    Jim,

    That works for text, but not for code... If you insert "<a href="site">bla</a>" it will be "bla", linking to "site".
     
  5. Jim

    Jim New Member

    Messages:
    170
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    <div style="border: 1px solid black; width: 640px; font-family: Courier;"><xmp>codehere</xmp></div>
    That should do it.

    <xmp> is deprecated, but it works. :p
     
  6. prasys

    prasys New Member

    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    0
    I think xmp should help you there , BSS. Again thats the way to do it
     

Share This Page