How to add color to the text in notes

General out-of-character discussion among players of Cantr II.

Moderators: Public Relations Department, Players Department

User avatar
Vitae Essentia
Posts: 35
Joined: Fri Nov 19, 2010 10:53 pm

How to add color to the text in notes

Postby Vitae Essentia » Tue Dec 14, 2010 6:49 pm

I've noticed a few notes that had color to it. I was wondering if any one knew how to do that and if they could possibly show me how to do it?
Missy
Posts: 2467
Joined: Mon Jul 21, 2003 9:12 am
Location: Pennsylvania

Re: How to add color to the text in notes

Postby Missy » Tue Dec 14, 2010 7:08 pm

As far as I know you can't. (I may be wrong ) but I thought that html was disabled for use in notes (I think) because people kept forgetting/purposely not closing the tags and it was screwing up the game.
I hate people.
User avatar
Cdls
Posts: 4204
Joined: Sat May 14, 2005 7:09 pm

Re: How to add color to the text in notes

Postby Cdls » Tue Dec 14, 2010 7:24 pm

If that was the case, then the HTML in the notes already created wouldn't work...right?

The <font> tags should work unless they have in fact been disabled.


<font color="insert color"> content </font>
Missy
Posts: 2467
Joined: Mon Jul 21, 2003 9:12 am
Location: Pennsylvania

Re: How to add color to the text in notes

Postby Missy » Tue Dec 14, 2010 7:31 pm

Oh. You're right, it seems. It's just not allowed in the title line.
I hate people.
User avatar
Vitae Essentia
Posts: 35
Joined: Fri Nov 19, 2010 10:53 pm

Re: How to add color to the text in notes

Postby Vitae Essentia » Tue Dec 14, 2010 8:33 pm

Thank you very much Cdls :)
User avatar
Cdls
Posts: 4204
Joined: Sat May 14, 2005 7:09 pm

Re: How to add color to the text in notes

Postby Cdls » Tue Dec 14, 2010 9:20 pm

Missy wrote:Oh. You're right, it seems. It's just not allowed in the title line.


Yeah, I think that may be the portion you may be remembering as being disabled.

Vitae Essentia wrote:Thank you very much Cdls


No problem :)
User avatar
Wolf
Posts: 381
Joined: Wed Oct 12, 2005 4:25 pm

Re: How to add color to the text in notes

Postby Wolf » Thu Jan 27, 2011 3:01 am

The font-tag works well.
And if you're feeling really up to it, you could even do div's with inline styling, though some of that might not have the same effect on different browsers... in other words what might look like a fantastic note to a player on Firefox might cause some issues on Internet Explorer, and vice versa.
Worst examples I've seen, even ended up breaking the page when a note was read - possibly had to do with the creator of those notes not properly closing tags or setting a width/height for some element (div or otherwise) that broke something inside the note and ended up flowing over to the rest of the page.

In other words, HTML still works, at least to some extent... just not in the title field.
I do recall a time when CSS could be added in notes, which also caused some trouble... I think that got completely disabled a long time ago.
hmmmmm beer.... pizza.... computers.... women... stir-fried furry little critters...
User avatar
EchoMan
Posts: 7768
Joined: Fri Aug 26, 2005 1:01 pm
Location: Stockholm, Sweden

Re: How to add color to the text in notes

Postby EchoMan » Thu Jan 27, 2011 3:36 am

Style/CSS works just fine. Linked css doesn't (or shouldn't) :)
User avatar
Wolf
Posts: 381
Joined: Wed Oct 12, 2005 4:25 pm

Re: How to add color to the text in notes

Postby Wolf » Thu Jan 27, 2011 3:39 pm

EchoMan wrote:Style/CSS works just fine. Linked css doesn't (or shouldn't) :)

Exactly, on the linked CSS... I forgot to add the linked bit in my comment.
Long, long ago some of that would still pass and cause some serious trouble, but that got fixed as far as my vague memories of ancient history go :mrgreen:
And the style/css - I'm not sure if my inline styling comment is about the same that you're referring to but might very well be... though I was rambling on about the more general inline styling with for example div-tags.
I like using that stuff, to some extent... but sometimes even I get something that looks great in one browser yet has a less desirable effect in another.
hmmmmm beer.... pizza.... computers.... women... stir-fried furry little critters...
User avatar
EchoMan
Posts: 7768
Joined: Fri Aug 26, 2005 1:01 pm
Location: Stockholm, Sweden

Re: How to add color to the text in notes

Postby EchoMan » Thu Jan 27, 2011 4:10 pm

There are three ways to add style:

Code: Select all

1. <link type="text/css" rel="stylesheet" href="style.css" />
The file contains:
h1 { color: red; }

2. <style>
h1 { color: red; }
</style>

3. <h1 style="color: red;">...</h1>


All three does the same, but the last one only for the current element, while the two first would decorate all h1 tags in the html document red.
User avatar
Wolf
Posts: 381
Joined: Wed Oct 12, 2005 4:25 pm

Re: How to add color to the text in notes

Postby Wolf » Sat Jan 29, 2011 1:20 am

EchoMan wrote:There are three ways to add style:

Code: Select all

1. <link type="text/css" rel="stylesheet" href="style.css" />
The file contains:
h1 { color: red; }

2. <style>
h1 { color: red; }
</style>

3. <h1 style="color: red;">...</h1>


All three does the same, but the last one only for the current element, while the two first would decorate all h1 tags in the html document red.


Yup... though I vaguely recall in ancient Cantr history the first caused some issues and getting disabled, or something like that...
The second I haven't used in making any notes, at least not in a few years, I might have used it in ancient Cantr history though...
The third is what I use a lot, even when designing notes offline that never make it into becoming actual notes, it's the inline styling that I mentioned earlier (at least, that's what I call it, not sure if the youngsters still call it that :mrgreen: )
hmmmmm beer.... pizza.... computers.... women... stir-fried furry little critters...
User avatar
Joshuamonkey
Owner/GAB Chair/HR Chair/ProgD
Posts: 4537
Joined: Sun May 01, 2005 3:17 am
Location: Quahaki, U. S. A.
Contact:

Re: How to add color to the text in notes

Postby Joshuamonkey » Mon Feb 07, 2011 3:37 pm

What I find nice are simple tables in notes, particularly for keeping track of buildings and vehicles in a town, or for trade rates.

Code: Select all

<table border="1">
<tr><th>Building</th><th>Character</th></tr>
<tr><td>Building 2</td><td>Character 2</td></tr>
</table>
https://spiritualdata.org
http://doryiskom.myminicity.com/
"Don't be afraid to be different, but be as good as you can be." - James E. Faust
I'm a mystic, play the cello, and run.
User avatar
Misato
Posts: 864
Joined: Thu Jan 11, 2007 5:51 am
Location: USA

Re: How to add color to the text in notes

Postby Misato » Mon Feb 07, 2011 11:34 pm

Hey, you guys know what would be totally awesome? A full list of all of the codes that can be used in the notes! :D
ImageImage
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe."
User avatar
Snickie
RD/HR Member/Translator-English (LD)
Posts: 4946
Joined: Tue Jul 06, 2010 5:28 pm
Location: FL

Re: How to add color to the text in notes

Postby Snickie » Mon Feb 07, 2011 11:42 pm

Joshuamonkey wrote:What I find nice are simple tables in notes, particularly for keeping track of buildings and vehicles in a town, or for trade rates.

Code: Select all

<table border="1">
<tr><th>Building</th><th>Character</th></tr>
<tr><td>Building 2</td><td>Character 2</td></tr>
</table>

I use these tables ALL THE TIME. :mrgreen:
-goes to try the text color thing-
User avatar
Pies
Programming Dept. Member
Posts: 383
Joined: Sat Nov 29, 2008 1:32 pm
Location: https://314es.pl/irc
Contact:

Re: How to add color to the text in notes

Postby Pies » Tue Feb 08, 2011 12:48 am

Misato wrote:Hey, you guys know what would be totally awesome? A full list of all of the codes that can be used in the notes! :D

Here you go:
Those:
http://www.w3schools.com/tags/default.asp
http://www.w3schools.com/css/css_reference.asp

And those, but they don't have to be as good because not everyone have modern browser.
http://www.w3schools.com/html5/html5_reference.asp
http://www.w3schools.com/css3/css3_reference.asp

You can use most of them, just don't try playing with <script> <iframe> <applet> etc. Only things what you could do in reality on paper, no games or films.
dwudziestoletni mężczyzna wrote:"OOC: Jak ci się nie podoba, to nie graj. Ta gra nie szuka więcej graczy."

kaloryfer wrote:This game already has a lot of problems, new players would only bring new ones.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest