How to disable styling on <pre> in bootstrap

MohitC picture MohitC · Mar 16, 2016 · Viewed 9k times · Source

I am using HTML's <pre></pre> to render my text as is with \n and spaces in a block. But bootstrap's default behaviour puts a <pre> block in a bordered box with a grey background. I don't want that. I want it to displayed as plain text.

How to disable that styling behavior for pre?

Answer

Praveen Kumar Purushothaman picture Praveen Kumar Purushothaman · Mar 16, 2016

You can just do this:

pre {border: 0; background-color: transparent;}

Check this Vanilla CSS Un-Reset for default values of other properties.