Change the code background color?

Go down

Solved Change the code background color?

Post by inallsorts on Sat 31 Mar 2012 - 6:47

Hello to all,

Every time the "[code]" tags are used, the background color Is white. Just wondering how to change the color? The text Is fine, just want a different background color.

Here's a pic:


All help Is greatly appreciated.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change the code background color?

Post by E-Mark on Sat 31 Mar 2012 - 7:10

Since you are using Phpbb2, here's the code.
Put this on your CSS Stylesheet:
Code:

.code{
   color: #COLOROFTHETEXT;
   background-color: #BACKGROUNDCOLOR;
   }
avatar
E-Mark
Active Poster

Male Posts : 1389
Reputation : 164
Language : English, Tagalog
Location : Republic of the Philippines

http://coding-spot.darkbb.com/

Back to top Go down

Solved Re: Change the code background color?

Post by inallsorts on Sat 31 Mar 2012 - 14:19

Sorry, forgot to update my details, I'm using phpBB3.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change the code background color?

Post by E-Mark on Sat 31 Mar 2012 - 14:25

For Phpbb3 Wink:
Code:

dl.codebox {
   background-color: #BACKGROUNDCOLOR;
   }
dl.codebox dt {
   border-bottom: 1px solid #COLOROFTHEBORDER;
   }
avatar
E-Mark
Active Poster

Male Posts : 1389
Reputation : 164
Language : English, Tagalog
Location : Republic of the Philippines

http://coding-spot.darkbb.com/

Back to top Go down

Solved Re: Change the code background color?

Post by inallsorts on Sat 31 Mar 2012 - 17:33

Thanks so much E-Mark, you've been of great help.

Just one last question, Is It possible to change the color of the text (as displayed In my first post which Is green) by adding to the above code? I'd like to change It to white.

Thanks again.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change the code background color?

Post by E-Mark on Sat 31 Mar 2012 - 18:00

Add this to your CSS:
Code:

dl.codebox code {
      color: #ffffff;
}

Wink
avatar
E-Mark
Active Poster

Male Posts : 1389
Reputation : 164
Language : English, Tagalog
Location : Republic of the Philippines

http://coding-spot.darkbb.com/

Back to top Go down

Solved Re: Change the code background color?

Post by inallsorts on Sun 1 Apr 2012 - 12:07

Thank you E-Mark, I really appreciate your help Smile

/Topic.

inallsorts
Forumember

Posts : 246
Reputation : 8
Language : English

Back to top Go down

Solved Re: Change the code background color?

Post by E-Mark on Sun 1 Apr 2012 - 12:09

Your welcome Wink.
avatar
E-Mark
Active Poster

Male Posts : 1389
Reputation : 164
Language : English, Tagalog
Location : Republic of the Philippines

http://coding-spot.darkbb.com/

Back to top Go down

Solved Re: Change the code background color?

Post by Base on Sun 1 Apr 2012 - 16:55

Topic Solved & Locked
avatar
Base
Forumaster

Male Posts : 10386
Reputation : 1693
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Back to top


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