I had a problem with the display of my page, the code that was at the end I solved it, but the person who told me what to do did not explain it very well to me.
* {
margin:0;
padding:0;
}
I had a problem with the display of my page, the code that was at the end I solved it, but the person who told me what to do did not explain it very well to me.
* {
margin:0;
padding:0;
}
By default some html elements have a padding and a margin. When doing the reset;
* {
padding:0;
margin:0;
}
you are removing all the padding and the margin that comes by default and reset it to 0, this way when you are editing your css you can put the margin and padding you want to the different elements without a previous padding or margin affect.
If you want you can see more about the default values of the html elements in w3, link (look for example that the body element has a default margin of 8px)
It is recommended if you want to put your own paddings and margins. You must also take into account the other labels that may be affected.
It is very common to use a bootstrap.css or reset.css to start the common css. Let's say that each navigation engine can apply rules such as padding to certain elements, to force "split" from the same base, it is common to use css like the one below: normalize.css