How to add font and font color in posting body (messages)?
3 posters
Page 1 of 1
How to add font and font color in posting body (messages)?
Hi, I just added a font in the template posting body (Messages posting) and then I wanted to add a new color. That's where it went wrong
The color didn't work and the font (monotype corsiva) that was added and working fine disappeared. Now I can add a font or a color but it doesn't show on the forum.
What am I doing wrong???
I'm working with phpbb2 and this is what I want to add:
and
I hope someone can help.
The color didn't work and the font (monotype corsiva) that was added and working fine disappeared. Now I can add a font or a color but it doesn't show on the forum.
What am I doing wrong???
I'm working with phpbb2 and this is what I want to add:
- Code:
<button style="color:grey;" onclick="bbfontstyle('[color=grey]', '[/color]');selectWysiwyg(this, 'color');return false;" onmouseover="this.className='selectHover';" onmouseout="this.className='';">{L_COLOR_GREY}</button><br />
and
- Code:
<button style="font-family:'Monotype Corsiva';" onclick="bbfontstyle('[font=Monotype Corsiva]', '[/font]');selectWysiwyg(this, 'font');return false;" onmouseover="this.className='selectHover';" onmouseout="this.className='';">Monotype Corsiva</button><br />
I hope someone can help.
Claudia- Forumember
- Posts : 37
Reputation : 0
Language : Dutch
Location : The Netherlands
Re: How to add font and font color in posting body (messages)?
I will test this right now. Please be patient and wait for my next reply.
Best Regards
Gunhack X
Best Regards
Gunhack X
Re: How to add font and font color in posting body (messages)?
Ok, I am done and ready to guide you.
First, your font code is Ok. PASS
Second, your color code is WRONG. NO PASS
Reason: Incorrect code.
Now, I will tell you how to fix your color code:
Well, here is your current code: (I have marked the bad code part with red)
Now, this is the new one that will work: (Write anything you like on it. It will be the name of the color).
For example:
#FF0080 = Light Purple
#804000 = Brown
You will need to write only the color (HEX) code into this line:
Good Luck!
BEST REGARDS
GUNHACK X
First, your font code is Ok. PASS
Second, your color code is WRONG. NO PASS
Reason: Incorrect code.
Now, I will tell you how to fix your color code:
Well, here is your current code: (I have marked the bad code part with red)
Remove the red maked line with the next code. You will need to delete that part of the code If you want to add another color and write it like the next code. ALWAYS!<button style="color:grey;" onclick="bbfontstyle('', '');selectWysiwyg(this, 'color');return false;" onmouseover="this.className='selectHover';" onmouseout="this.className='';">{L_COLOR_GREY}</button><br />
Now, this is the new one that will work: (Write anything you like on it. It will be the name of the color).
But, there is another thing you need to know. The color names will not always work with the HTML Code, so you will need to find another sources to get help about color codes. For example: If you want to add a color name Light Purple the name will be not recognize by the user browser, so it is more safe to use Color Codes.<button style="color:grey;" onclick="bbfontstyle('', '');selectWysiwyg(this, 'color');return false;" onmouseover="this.className='selectHover';" onmouseout="this.className='';">Grey</button><br />
For example:
#FF0080 = Light Purple
#804000 = Brown
You will need to write only the color (HEX) code into this line:
and write the color name into this line:<button style="color:#804000" onclick="bbfontstyle...
Here, it is a good color codes resource for begin:..."this.className='';">Brown</button><br />
- Code:
http://www.computerhope.com/htmcolor.htm
Good Luck!
BEST REGARDS
GUNHACK X
Re: How to add font and font color in posting body (messages)?
Thank Gunhack for your answers but I tried this already and it's not working
The font worked fine but when I added a color it disappeared and now I can't get it to work again.
Hopefully someone knows how to solve this...
The font worked fine but when I added a color it disappeared and now I can't get it to work again.
Hopefully someone knows how to solve this...
Claudia- Forumember
- Posts : 37
Reputation : 0
Language : Dutch
Location : The Netherlands
Re: How to add font and font color in posting body (messages)?
But, I test it.
Did you remove the {L_COLOR_GREY}? from the code and replace it by the name of the color? because it was your problem.
Did you remove the {L_COLOR_GREY}? from the code and replace it by the name of the color? because it was your problem.
Re: How to add font and font color in posting body (messages)?
Yes, I did that.
Claudia- Forumember
- Posts : 37
Reputation : 0
Language : Dutch
Location : The Netherlands
Re: How to add font and font color in posting body (messages)?
Maybe something like this...
The result should be like this...
<html>
<head>
<button style="color:blue !important; # <-- Font color
" onclick="bbfontstyle('', '') !important;
selectWysiwyg(this, 'color') !important;
return false !important;
" onmouseover="this.className='selectHover' !important;
" onmouseout="this.className='' !important;
">text goes here</button><br />
</body>
</html>
Atleast it works here on the forums & my forum ^^
I hope i helped!
Regards,
Doomie
- Code:
<button style="color:blue !important; # <-- Font color
" onclick="bbfontstyle('', '') !important;
selectWysiwyg(this, 'color') !important;
return false !important;
" onmouseover="this.className='selectHover' !important;
" onmouseout="this.className='' !important;
">text goes here!</button><br />
The result should be like this...
<html>
<head>
<button style="color:blue !important; # <-- Font color
" onclick="bbfontstyle('', '') !important;
selectWysiwyg(this, 'color') !important;
return false !important;
" onmouseover="this.className='selectHover' !important;
" onmouseout="this.className='' !important;
">text goes here</button><br />
</body>
</html>
Atleast it works here on the forums & my forum ^^
I hope i helped!
Regards,
Doomie
Doomie- Forumember
- Posts : 140
Reputation : 0
Language : English,Swedish,Arabic
Location : Gothenburg, Sweden
Similar topics
» Font/background Color in Topic Body
» Can't change font size of forum descriptions and font color of site description
» Posting Body help me
» posting body
» posting body
» Can't change font size of forum descriptions and font color of site description
» Posting Body help me
» posting body
» posting body
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum