Fixed width font

Post Reply
Kristen
Posts: 3877
Joined: Thu Sep 29, 2011 9:16 am
Location: Suffolk
Contact:

Fixed width font

Post by Kristen » Sat Feb 25, 2012 12:48 pm

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
K's Garden blog last update 30th December 2012, HTUK Blog


User avatar
GoggleboxUK
Posts: 16877
Joined: Fri Mar 04, 2011 9:58 pm
Location: Preston Lancashire

Re: Fixed width font

Post by GoggleboxUK » Sat Feb 25, 2012 3:09 pm

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.
Once upon a time there were 3 little bears. Now there's thousands of them.


User avatar
kata
Posts: 14589
Joined: Mon Feb 22, 2010 10:03 pm

Re: Fixed width font

Post by kata » Sat Feb 25, 2012 4:06 pm

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;

?>
http://flowersnpalms.com/floraandfaunauk/

Rain...nowt but rain...Welcome to Lancashire............ :lol: :lol: :lol:


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

Re: Fixed width font

Post by redsquirrel » Sat Feb 25, 2012 7:02 pm

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
Posts: 3877
Joined: Thu Sep 29, 2011 9:16 am
Location: Suffolk
Contact:

Re: Fixed width font

Post by Kristen » Sat Feb 25, 2012 7:07 pm

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
K's Garden blog last update 30th December 2012, HTUK Blog


User avatar
fieldfest
Posts: 1687
Joined: Tue Jan 04, 2011 2:50 pm
Location: Ryde, Isle of Wight

Re: Fixed width font

Post by fieldfest » Sat Feb 25, 2012 7:07 pm

isnt courier fixed width?


Kristen
Posts: 3877
Joined: Thu Sep 29, 2011 9:16 am
Location: Suffolk
Contact:

Re: Fixed width font

Post by Kristen » Sat Feb 25, 2012 7:08 pm

fieldfest wrote:isnt courier fixed width?
Yup, can I select Courier Font here? That would be perfect if I can.
K's Garden blog last update 30th December 2012, HTUK Blog


Kristen
Posts: 3877
Joined: Thu Sep 29, 2011 9:16 am
Location: Suffolk
Contact:

Re: Fixed width font

Post by Kristen » Sat Feb 25, 2012 7:08 pm

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)
K's Garden blog last update 30th December 2012, HTUK Blog


User avatar
kata
Posts: 14589
Joined: Mon Feb 22, 2010 10:03 pm

Re: Fixed width font

Post by kata » Sat Feb 25, 2012 7:46 pm

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.
http://flowersnpalms.com/floraandfaunauk/

Rain...nowt but rain...Welcome to Lancashire............ :lol: :lol: :lol:


User avatar
GoggleboxUK
Posts: 16877
Joined: Fri Mar 04, 2011 9:58 pm
Location: Preston Lancashire

Re: Fixed width font

Post by GoggleboxUK » Sat Feb 25, 2012 9:05 pm

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.

;)
Once upon a time there were 3 little bears. Now there's thousands of them.


User avatar
GoggleboxUK
Posts: 16877
Joined: Fri Mar 04, 2011 9:58 pm
Location: Preston Lancashire

Re: Fixed width font

Post by GoggleboxUK » Sat Feb 25, 2012 9:07 pm

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:
Once upon a time there were 3 little bears. Now there's thousands of them.


Post Reply