Grow your CSS skills. Land your dream job.

Code Box help?

  • # December 16, 2011 at 6:29 pm

    I need help disabling a html tags inside a div. It’s so that I can make a code box like the one here.

    So that if I typed into

    it would appear with the “< " and ">” intact, and not affecting to core html at all. Is it some Javascript function, or a CSS feature. Thanks for your help in advance.

    # December 17, 2011 at 4:07 am

    You can do this by wrapping <pre><code>Around the text</code></pre>

    # December 18, 2011 at 1:08 am

    I know that, but then do I style it like this?


    pre {
    color: #fff;
    background: #000;
    }

    # December 18, 2011 at 6:58 am

    This site and many others use Prettify – http://code.google.com/p/google-code-prettify/ – It should do what you want and has customisable styles.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".