CSS relative display

An element takes up space (width & height)
The display decides if the next element is shown on the same line, or a new one.
e.g. to draw an element next to another without taking up any space

<style>
.testclass {
  float: left;
  position: relative;
  display: inline;
  width:0;
  left:-10px;
}
</style>

<body>
<div class="testclass">
  <button onclick="myFunction()" class="btn">Button</button>
</div><p>testtesttesttest</p>
<body>

web development
HTML CSS