View formatless HTML tags from Twitter Bootstrap

Asked

Viewed 184 times

0

Guys have a column in the bank where I type posts from the site. La I do all the formatting with Bold, alignments, fonts and everything. Only when I will display on the site many settings of the tags stay as Twitter Bootstrap configures so being disappear for example the bookmarks. How do I display this content on the site without having the modifications made by Twitter Bootstrap? Thank you

2 answers

2

What you need to do is a context, or wrapper as it is commonly used in CSS.

The context or wrapper is a (parent) element that will involve several elements with specific rules or not.

Example:

p {color:blue;}
.wrapper p {color:red;}
<p>Estou fora do contexto....</p>
<div class="wrapper">
   <p>Eu estou no contexto...</p>
</div>
<p>Eu também estou fora do contexto....</p>

So you need to create a CSS with a wrapper that overrides the Twitter Bootstrap rules.

A very simple way to keep the CSS of a wrapper:

.wrapper * {
  margin:0;
  padding:0;
  list-style:none;
  vertical-align:baseline;
  color:black;
}

Here a CSS Reset widely used, to wrap it in wrapper just add the class before all selectors.

0

You need overwrite the settings the elements are receiving from Bootstrap!

How to do this?

place !important in the settings you want to prioritize. Example:

p { color: red !important; }

Source


EDIT: Another way is to put the style directly in html. Example:

<p style="color: red;"> Olá mundo! </p>
  • look I thought about it. But if I do this I’ll also change the layout of the site. I figured I’d have some other way to do this.

  • see another way I put

Browser other questions tagged

You are not signed in. Login or sign up in order to post.