Fixed width font

Post Reply
Kristen

Fixed width font

Post by Kristen »

I've got a table of data I want to post, is there a way to use a fixed-width font?

I could use a [code] tag but I want to use [color] tags too, and they are not rendered (as colour) when using the [code] tag.

Otherwise it will have to be an image which I don't think will be as useful
GoggleboxUK

Re: Fixed width font

Post by GoggleboxUK »

As far as I know you can only used fixed width within the code tags unless you use something other than BBcode (such as HTML) but I don't think the forum is set up to accept HTML or HTML widgets.

You could possibly host the table elsewhere and link to it rather than posting it as an image but the [img] option would seem the best for displaying on here, just externally link it at 800 x 600 px rather than attaching.
kata

Re: Fixed width font

Post by kata »

I was at BBCode site and found this Kristen,

If you want to post some programming source code, you probably want to display it in a fixed-width font. You can do this with the

Code: Select all

 tag. If the code you are posting is PHP, you can use the [php] tag, which adds fancy syntax highlighting and PHP-style delimiters.

Text inside these tags is not parsed for BBcode or smilies; it is displayed as-is. Whitespace inside the tags is preserved as well.

Both of these tags are block tags, meaning they are separated from the rest of the text and have special formatting applied. Remember that for displaying text inline with a fixed-width font, you can use the [fixed] tag!

You may be wondering how these tags differ from the [pre] tag described above. The one important difference is that any BBcode tags encountered inside [code] and [php] are NOT rendered, as described above.

    [code]

      package My::Buns;

      sub create_bun {
        return bless {}, $_[0];
      }

      1;

    
The code will be displayed exactly as it is entered, but in a fixed-width font.
code:


package My::Buns;

sub create_bun {
return bless {}, $_[0];
}

1;


The [php] tag works very similiarly, for example...

[php]

= "globals rule!";
echo preg_replace("/[A-Z]/", "?", );
exit;

[/php]

This code would produce the following:
php:

<?

= "globals rule!";
echo preg_replace("/[A-Z]/", "?", );
exit;

?>
User avatar
redsquirrel
Posts: 12169
Joined: Thu Feb 26, 2009 8:35 pm
Location: bristol
Contact:

Re: Fixed width font

Post by redsquirrel »

kata wrote:I was at BBCode site and found this Kristen,




package My::Buns;

sub create_bun {
return bless

?>
you posting your baps about K ??? :lol: :lol:
mars ROVER broken down. headgasket faillure
Kristen

Re: Fixed width font

Post by Kristen »

GoggleboxUK wrote:You could possibly host the table elsewhere and link to it rather than posting it as an image
Doh! What ... you mean ... like ... post it on my Blog?

Je Suis Un Twat!

<SlapsForehead!>

Thanks GB
fieldfest

Re: Fixed width font

Post by fieldfest »

isnt courier fixed width?
Kristen

Re: Fixed width font

Post by Kristen »

fieldfest wrote:isnt courier fixed width?
Yup, can I select Courier Font here? That would be perfect if I can.
Kristen

Re: Fixed width font

Post by Kristen »

Kata: Sorry, I though of using CODE but it doesn't support COLOUR which I also wanted to use (to highlight some figures in my table)
kata

Re: Fixed width font

Post by kata »

lol @ RedS :lol: :lol: :lol: :lol: :lol: :lol:

Its not easy this web design stuff Kristen. If it was your own you could have done it all in CSS...get learning........ icon_cheers icon_cheers icon_cheers icon_cheers

I saw a real cool attribute in BBCode. What it was you imput who is that? [spoiler]a man in a black suit.[/spoiler]

That is supposed to hide whats under the piece of black when you 'mouseover it.but it never worked here...typical. I love a secret message.... :lol: :lol: :lol: :lol:

Lets try c/p direct from the site.

hey guess what [spoiler]the butler did it[/spoiler].

That should work but maybe Aido has not set that code up.
GoggleboxUK

Re: Fixed width font

Post by GoggleboxUK »

Kata, all BBCode tags have to be enabled individually by forum admin in control panel, that's why spoiler, php and flash tags don't work here.

U asked Dave if Aido would add media and spoiler tags last time Aido was working on the site and he enabled media but not spoiler because Dave said he didn't see the value of it as it may encourage people to be somewhat less chivalrous.

;)
GoggleboxUK

Re: Fixed width font

Post by GoggleboxUK »

Kristen wrote:
GoggleboxUK wrote:You could possibly host the table elsewhere and link to it rather than posting it as an image
Doh! What ... you mean ... like ... post it on my Blog?

Je Suis Un Twat!

<SlapsForehead!>

Thanks GB
:lol:

Happens to me all the time, get so caught up in the task the walls start closing in and I can't see the obvious.

What really annoys me is when my 18 year old son stands behind me and says "Why don't you just....." and I feel like kicking myself.

:lol:
Post Reply