DaniSpringer.com DaniSpringer.com - 1 year ago 46
HTML Question

Empty Space Between Divs?

I'm using a framework with a 12 column grid (bootstrap).

On my first

, I have one
taking up 10 columns, and one taking up 1 column.
Of course, that takes up 11 out of 12 columns.

Must I use all twelve columns, or is there a way to insert empty space between divs?

Answer Source

I changed col-9 to col-10, and instead of applying margin-right to the div holding the h1 and h4, I added it to each one directly (perhaps there is a better way, like A B {}.



<div class="row">
    <div class="col-2"><img src="images/logo.png" width="100px" height="100px" alt="Logo" />
    <div class="col-10 titolo">
      <h1>DANI SPRINGER</h1>
      <h4>FRONT-END NINJA</h4>


h1 {
    margin-right: 5px;

h4 {
    margin-right: 5px;

.titolo {
    text-align: right;