My output has a large space between "specs" and "black metal" and on top of and below "This is Vudu’s…" How do I change that?
<span style="font-size:12px">This is Vudu's newest product...</span>
<h3><strong>Specs</strong></h3>
<main>
<ul>
<li>black metal</li>
<li>aircraft grade material</li>
</ul>
</main>
I have tried specifying margins with pixels and percentage but neither do anything. I have used two different programs, am currently working on w3schools, but there is always the same result.
2
Answers
Headings and ul have default marging set already in browser. So you need to reset it to 0 like this. (It is not vudu thing…😊)
We need to override two elements the H3 and the UL default styles.
The default CSS for an
<h3>
element is:Default style for (in chrome at least) for
<ul
isHere I include but commented out the defaults and then the part I need to override for the issue at hand using a class for each element since I find using an element name like
<h3
or<ul
in my CSS simply applies to too much HTML for my taste.