relative div and button

<!DOCTYPE html>
<html lang="en">
<head>
<style>
.dd1{
position: relative;
height: 400px;
width: 500px;
background-color: aqua;
display: inline-block;
}
</style>
</head>
<body>
<div class="dd1">

</div>
<button>gg</button>
</body>
</html>
if the dd1 has a letter in it like <div> d </div>
then it all will be ok
why this happens and how to fix it for good not like put a p element with opacity 0
Capture.PNG
Was this page helpful?