Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I set html and body padding to 0 in Vuejs without affecting bootstrap elements?

I’m creating a bootstrap navbar in my Vuejs project and it’s spaced with some left and right margin without adding any body or html padding to 0.

When I go to welcome.blade.php file and set body and html padding to 0 like so:

*{
   padding: 0!important;
 }

Then I get no right and left space on my bootstrap navbar but algo I get no space between elements inside my bootstrap navbar.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I want to set HTML and body padding to 0 without affecting bootstrap element paddings/margins.

>Solution :

If you use * that means all tags and classes,

You have to use

 body {
   padding: 0 !important;
   margin: 0 !important;
 }
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading