I try to put some buttons over a horizontal rule in HTML. I tried with left, up (to put in the up-right corner but hr is stopping my button from moving up). Here is my code in HTML:
<!DOCTYPE html>
<html>
<head>
<style>
.button{
display:inline-flex;
height: 25px;
padding: 0;
background-color: rgb(190, 190, 190);
border: none;
outline: none;
border-radius: 5px;
overflow: hidden;
font-family: 'Quicksand' , sans-serif;
font-size: 15px;
font-weight: 400;
cursor:pointer;
text-align:center;
position: relative;
left:600px; up:20px;
}
.button:hover {
background: rgb(134, 134, 134);
}
.button:active {
background: rgb(158, 157, 157);
}
.button__text,
.button__icon{
display: inline-flex;
align-items: center;
padding: 0 3px;
color: whitesmoke;
height: 100%;
}
</style>
</head>
<body style="background-color: white;">
<h1 style="font-family:Arial, Helvetica, sans-serif">Product list</h1>
<hr>
<button type="button" class="button">
<span class="button__icon">
<ion-icon name="add-circle-outline"></ion-icon>
</span>
<span class="button__text">ADD</span>
</button>
<script src="https://unpkg.com/ionicons@5.4.0/dist/ionicons.js"></script>
</body>
</html>
Can somebody explain to me how can I resolve this?