'How can I override margin-block-start?

I included normalize.css I have margin:0 on the header elements I have margin:0 on every class on the page

https://www.christianlong.design/SuperSmashBrosDB/phptest6.php

I can't figure out how to change the margin of the h3 elements for the life of me.



Solution 1:[1]

e.g Chrome Browser has some defaults at the user agent for some blocks:

h3 {
  display: block;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
}

You can reset with:

margin-block-start:0; margin-block-end:0; margin-inline-start:0; margin-inline-end:0;
padding-block-start:0; padding-block-end:0; padding-inline-start:0; padding-inline-end:0;

Solution 2:[2]

Just ran into the same issue, what helped me is to use !important to override this for good. Just like this:

h3 { 
  margin: 0px !important;
}

It might not be the best solution, but here's a good article on uses of that rule.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Yuliya K