Jump to content

Code tag is weird...


Recommended Posts

Could we get a different code tag? The one here displays the code awkwardly. It has a wordwrap which just doesn't look right with code (who codes with wordwrap on?). I think it should be in a div with overflow: auto or something similar.

I'd be more than willing to write it, while taking multiple browsers into consideration. :)

Edited by Dumpy Dooby
Link to comment
Share on other sites


Use

 and 

, you will get scrollbars instead of wrap. The only problem this presents is it is really ugly if you require less than about six lines of code, because there is a minimum box height set.

Also bear in mind that in most coding it is generally accepted good practice to keep your lines to less than 80 characters in length.

Edited by Alanoll
Link to comment
Share on other sites

Actually, what I miss the most with the code tag is the syntaxical coloration.

this would be so much better and faster to catch the the aim and mechanism of a piece of code.

For example, I know pretty well Visual Basic (for application but hey...) but I could never read any Visual Basic code posted on the forum. Especially those with a lot of comments to explain the code!!!!

- AutoIt forum has an [AutoIt] tag, although not so much used.

- PHP has a buit-in syntaxical coloration function.

- modules for other languages (js, sql, etc.) do exists in php. I used to use them in a wiki (wikini).

Why not implementing a few of them?

Link to comment
Share on other sites

  • 2 weeks later...

So, if I use

waaa
But I
still
wonder
why
Yzöwl
was able
to write them
without
actually
getting
the
codebox
:?

, I should get a nice thing ?

edit, OK, I do. :)

edit2: it would be better if it width was maximal. :}

Edited by Camarade_Tux
Link to comment
Share on other sites

Thanks Alanoll, by editing my post, youve completely changed what I had to say. I will say it again here, however, if ther is some reason after sixteen days why what I had wrote was in some way in breach of some rule, please let me know by PM, Thanks.

What it said was:

<Edit>

Or more correctly:

and

</Edit>

Edited by Yzöwl
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...