Overwrite: after &: before the contents of Bootstrap classes

I want to rewrite the following CSS

.navbar:before{ display: table; content: " "; } 

and delete any content in the files before or after. This creates unnecessary space between my navigation bar and the left panel. I tried to give this class

 content: none !important; 

But he did not correspond. Is there any way to rewrite this? I am in the latest version of Bootsrap.

+6
source share
2 answers

To redefine this would be enough:

 .navbar:before { content: none !important; } 

If this does not help, you can also try:

 .navbar:before { display: none !important; } 

This will hide the item. But if you donโ€™t see redefined properties (check that with the developer tool inspector), I would search if these CSS rules are even added to the page.

It is also possible that something else causes space.

It is important to override even the built-in properties added with style="" . Here are some specifics:

https://css-tricks.com/specifics-on-css-specificity/ http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/

+7
source

If content: none does not work, try display: none .

And that it does not overwrite, you saw in devtools? Obviously, something forces him not to correspond, it would be nice to have a direct look;)

0
source

Source: https://habr.com/ru/post/984225/


All Articles