0

I have a very easy HTML like below:

<!DOCTYPE html>
<html>

<head>
  <style>
    div.framework {
      position: relative;
      width: 500px;
      height: 500px;
      border: 0;
      padding: 0px;
      margin: 0px;
    }
    
    div.outside1 {
      position: relative;
      width: 20%;
      height: 30px;
      border: 0px;
      display: inline-block;
      margin: 0px;
    }
  </style>
</head>

<body>
  <div class="framework">
    <div class="outside1">DIV1</div>
    <div class="outside1">DIV2</div>
    <div class="outside1">DIV3</div>
    <div class="outside1">DIV4</div>
    <div class="outside1">DIV5</div>
  </div>
</body>

</html>

I suppose the big DIV is 500px and each child DIV is 20%, so all the DIV should be in one line, However, when Chrome display, the fifth DIV is in the second line. Would anyone know why?

Aleksandr Belugin
  • 2,149
  • 1
  • 13
  • 19
JoseLuis
  • 81
  • 1
  • 8

0 Answers0