Hehe, well ... web browsers are different, I would say that everything is fine with Firefox, as a rule, goes well with the standard, but this is not entirely true.
According to xhtml1-strict.dtd only <li / "> can be a child of <ul /">. I suggest you become a designer who knows about the standards. These are formal specifications with which you can test your HTML.
<p>Paragraph.</p> <ul> <li>List item.</li> <li>Another list item. <p>List paragraph.</p> </li> </ul>
But back to your question (which, by the way, is a pain to answer). There are many cases when you define a non-zero margin and complement. I prefer extra margin when padding is not needed, and then laying when margin is not working. Each situation is different, and you need to know when it is preferable.
I will not go into details because I think that you are on the right track. Keep experimenting, and I know that you get it. But keep in mind that web browsers do things differently.
I am not sure about this error, but a space is sometimes considered margin. If a bunch of elements occurs without a space between them, which sometimes differs from where there is no white space.
Again, this is a lot to accept, so I will not go into details, but you need to know about these things, and you will get this knowledge by practicing.
Paragraph and list fields by default are not the same cross-browsers, when you start doing all these layouts, you want to define a set of basic CSS rules for your page. And if you need help regarding which fields, I suggest you take a look at the canons of page construction .
p { margin: 1em 0; } ul { margin: 1em 0; } ul > li { margin: 1em 0; }
The above rules are just an example, but they do what they ensure that the top and bottom margins for paragraphs and list items are the same, despite the browser. Such things make your page look like a cross browser.
Keep checking things out and read the excellent CSS blogs there. Ask for help when you come across really obscure edge cases. These people spent a lot of time deciding, and your time is better spent learning how they did it than reinventing the wheel.