-1

I have 3 divs placed side by side. When I'm trying to put a header (or any element) inside of the middle div (or any div), that div floats way down. Why does it do that? CSS I used for divs:

    div {
      display: inline-block;
      background-color: lightgray;
      height: 600px;
      width: 300px;
   }

Tomer Almog
  • 2,627
  • 2
  • 26
  • 32

1 Answers1

0

Add *{box-sizing:border-box} to your CSS. It defines how the width and height of an element are calculated.