: Issue linking Code Prettify alternate CSS file I have installed the full Google Code Prettify prettify-4-Mar-2013.tar.bz2 found here and hosting my own JavaScript/CSS works fine with the templates
I have installed the full Google Code Prettify prettify-4-Mar-2013.tar.bz2 found here and hosting my own JavaScript/CSS works fine with the templates provided:
<head>
<title>Google Code Prettify testing</title>
<link href="google-code-prettify/src/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="google-code-prettify/src/run_prettify.js?autoload=true&skin=sons-of-obsidian"></script>
</head>
I'm trying to link to a different CSS file, so that I can customize it. I got one from this Github page and saved it in google-code-prettifysrc as instructed on the page. I changed my header as such, per the instructions on the Github page
It's pretty simple.
1. Setup the Google Code Prettify.
2. Load a downloaded CSS file instead of prettify.css.
3. Beautiful.
<head>
<title>Google Code Prettify testing</title>
<link href="google-code-prettify/src/github.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="google-code-prettify/src/run_prettify.js?autoload=true"></script>
</head>
But then it just renders with the default Prettify style instead of the style from the new CSS file. I'm new at using this tool, and not very experienced designing websites overall so I'm not sure what I am doing wrong.
More posts by @Moriarity557
1 Comments
Sorted by latest first Latest Oldest Best
CSS is rendered in the order it's received.
For example, if your first CSS file says:
Body{background-color:blue;}
and your second CSS file says:
Body{background-color:red;}
The background will be Red because the second file overwrote the first.
In short move your gitup down.
Without seeing the JavaScript file, it is probably using a document.onReady() so it is technically being fired after the page loads.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.