The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Font Color of Text in Code

4 posters

Go down

Solved Font Color of Text in Code

Post by runawayhorses Sat 19 May - 2:33

I need a CSS code to set the font color of the text when you use the code tags. For example, if I were to use the code tags like below, how can I set the font color of the text in the code tags? I want to set the color as the default font color for all text when using the code tags.

Code:
This color of text here.

thanks


Last edited by runawayhorses on Sat 19 May - 3:45; edited 1 time in total
avatar
runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 166
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Font Color of Text in Code

Post by c3vietk Sat 19 May - 2:52

phpbb3 : add to css
Code:
.codebox dd{color:#000000}
#000000 <~ d color you want to set
c3vietk
c3vietk
Forumember

Male Posts : 65
Reputation : 41
Language : Vietnamese, HTML, Javascript, C#, PHP
Location : Vietnam, HCMc

http://diendan.chinhphuc.info/

Back to top Go down

Solved Re: Font Color of Text in Code

Post by Ahkrir Sat 19 May - 3:28

I use the above code, works for PunBB.
Not sure for BB3.
Ahkrir
Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Font Color of Text in Code

Post by runawayhorses Sat 19 May - 3:39

No it didn't work at all. I use phpbb3
avatar
runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 166
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Font Color of Text in Code

Post by Ahkrir Sat 19 May - 3:40

Can you get me your forum's url?

Try adding this to your css:
Code:
dl.codebox code {color: #000;}
Ahkrir
Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Font Color of Text in Code

Post by runawayhorses Sat 19 May - 3:45

Yes that one worked! thanks! Smile
avatar
runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 166
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Font Color of Text in Code

Post by Ahkrir Sat 19 May - 3:49

No problem :-)
Ahkrir
Ahkrir
Forumember

Male Posts : 288
Reputation : 14
Language : English
Location : The Netherlands

http://smarterweb.go-board.com/forum

Back to top Go down

Solved Re: Font Color of Text in Code

Post by Jophy Sat 19 May - 3:56

Topic Solved & Locked
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum