How do I place a checkbox embedded in the upper right of an image? This currently does not work
HTML:
<div class="container">
<img src="https://images.unsplash.com/reserve/bOvf94dPRxWu0u3QsPjF_tree.jpg?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60" />
<input type="checkbox" class="checkbox" id="check1" />
</div>
CSS:
.container {
position: relative;
width: 100px;
height: 100px;
float: left;
margin-left: 10px;
}
.checkbox {
position: absolute;
right: 5px;
top: 5px;
}
Aucun commentaire:
Enregistrer un commentaire