1

I have been trying to set up my blog to integrate code snippets. I tried prettify but it didn't really work. I have put

<script src='https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=desert'/>

in my template's head and then

  <body onload='prettyPrint()'>

As I used the desert skin, I could see the black background on my blog post but the problem is that the code itself is still black. Apparently something is forcing text to be always black. How could I fix that?

Mehdi
  • 1,370
  • 3
  • 15
  • 26

1 Answers1

0

Investigate the CSS using the developer tools of the browser you're using. For Chrome, right click where the text should be and click 'Inspect Element'. It should open the Developer Tools with the Elements tab selected. The left panel is the browser HTML representation of the the Document Object Model (DOM). Make sure the correct element is selected where the text should be. Then examine the right panel which shows the CSS in order of precedence with top style having the highest. Scroll down through that list to identify which style changed the text color to black. Change the color in style in the appropriate file or apply a new style that has a higher precedence.

If there is no text color style, then it is using the default text color of black. In this case you'll need to add a style to change the text color.

mindriot
  • 14,149
  • 4
  • 29
  • 40
  • This thing is a mind**** . I refresh my page three times and then there is colour. I write my code with
     in the text part instead of the html part and there is colour but also showing the 
     and 
    . I go to my blog click on a link of one of the blog contributor’s Google+ then I move back to my blog and there is colour. This doesn't make any sense...
    – Mehdi Oct 17 '14 at 09:00
  • @Mehdi Do these help? http://stackoverflow.com/questions/14540009/prettyprint-doesnt-get-called-on-page-load and http://stackoverflow.com/questions/1852537/how-to-use-prettify-with-blogger-blogspot – mindriot Oct 19 '14 at 05:42