The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Change the code background color?

View previous topic View next topic Go down

Solved Change the code background color?

Post by inallsorts on March 31st 2012, 6:47 am

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 March 31st 2012, 7:10 am

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

.code{
   color: #COLOROFTHETEXT;
   background-color: #BACKGROUNDCOLOR;
   }

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 March 31st 2012, 2:19 pm

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 March 31st 2012, 2:25 pm

For Phpbb3 Wink:
Code:

dl.codebox {
   background-color: #BACKGROUNDCOLOR;
   }
dl.codebox dt {
   border-bottom: 1px solid #COLOROFTHEBORDER;
   }

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 March 31st 2012, 5:33 pm

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 March 31st 2012, 6:00 pm

Add this to your CSS:
Code:

dl.codebox code {
      color: #ffffff;
}

Wink

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 April 1st 2012, 12:07 pm

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 April 1st 2012, 12:09 pm

Your welcome Wink.

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 April 1st 2012, 4:55 pm

Topic Solved & Locked

Base
Forumaster

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

http://forumotionhub.net

Back to top Go down

View previous topic View next topic Back to top


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