Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8092847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:22:25+00:00 2026-06-05T20:22:25+00:00

Example CSS #wrap{margin:20px} Code prettify wraps the whole line in .com <span class=com>#wrap{margin:20px}</span> Somebody

  • 0

Example CSS

#wrap{margin:20px}

Code prettify wraps the whole line in .com

<span class="com">#wrap{margin:20px}</span>

Somebody has a similar issue here.

Where someone answers “Are you loading lang-css.js?”.

Here’s what I’m loading in the footer.

<script src="/js/google-code-prettify/lang-css.js"></script>
<script src="/js/google-code-prettify/prettify.js"></script>

I can see both of them with web inspector. I tried changing the order and loading them from the header. I’m using the latest version.

All help is greatly appreciated 🙂

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:22:26+00:00Added an answer on June 5, 2026 at 8:22 pm

    The order you link to the javascript files matters. You need to call the base code (prettify.js) first followed by the css specific code (lang-css.js). You can place the script tags either in the head section or at the end of the document… both work but placing at the end of the document will speed up the page load.

    <script src="/js/google-code-prettify/prettify.js"></script>
    <script src="/js/google-code-prettify/lang-css.js"></script>
    

    You will also need to ensure that you are linking the stylesheet in the head of your document.

    <link rel="stylesheet" type="text/css" href="/css/prettify.css">
    

    You also need to add the correct classes your pre tag(s). The syntax-highlighting functions contained in lang-css.js will not be called without adding the class “lang-css” to the <pre> tag.

    <pre class="prettyprint lang-css linenums">
    

    Finally, make sure you call the “prettyPrint()” function on page load.

    <body onload="prettyPrint()">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to find an example that has css rollover using sprites & sliding door
For example http://twitter.github.com/bootstrap/base-css.html try to scroll up. You will see the bar with Typography
Found this is some example CSS I was reading and I'm having a hard
I'm creating an epub file and am trying to understand an example css for
Does anyone know good example of using CSS to create rounded corner box where:
For example I have a css style like this : input.validation-passed {border: 1px solid
For example: like target = _self in XHTML and position:static in CSS
JSFIDDLE EXAMPLE BELOW I want to make the following CSS layout and currently im
Update : Added simple test example http://jsfiddle.net/7UhrW/1/ using normalize.css. Chrome/WebKit and Firefox have different
How to clear float:left & float:right on CSS You may look an example here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.