The thickness of each side can be declared together or separately. Declaring together:
- <address>
- <article>
- <aside>
- <blockquote>
- <canvas>
- <dd>
- <div>
- <dl>
- <dt>
- <fieldset>
- <figcaption>
- <figure>
- <footer>
- <form>
- <h1>-<h6>
- <header>
- <hr>
- <li>
- <main>
- <nav>
- <noscript>
- <ol>
- <p>
- <pre>
- <section>
- <table>
- <tfoot>
- <ul>
- <video>
- <a>
- <abbr>
- <acronym>
- <b>
- <bdo>
- <big>
- <br>
- <button>
- <cite>
- <code>
- <dfn>
- <em>
- <i>
- <img>
- <input>
- <kbd>
- <label>
- <map>
- <object>
- <output>
- <q>
- <samp>
- <script>
- <select>
- <small>
- <span>
- <strong>
- <sub>
- <sup>
- <textarea>
- <time>
- <tt>
- <var>
box-sizing: border-box
box-sizing: border-box
When 2 elements have their margins touch, the margins will combined into one margin value as follow:
margin: auto
Can be used for horizontal centering.
Block and inline layout makes the normal flow. The default way things on the web behave.
By default, inner boxes within a box are laid out in normal flow. This inner display can be changed by defining display value.
display: inline-block
Inline-block is a very useful display value.
display: inline-block
, the links will not overlap the <ul> box anymore.Without inline-block, the paddings overlap resulting the some text covered. However still need to find code for having them in the same line.