Answers for "button with image html"

0

button with image html

<style>
#wrapper{
  width:150px;
  height:150px;
  position:relative;
}

#btn{
  width:100%;
  height:100%;
  position:absolute;  
  background:none;
  padding:15px
}

#img{
  width:100%;
  height:100%;
}
</style>

<div id='wrapper'>
  <button id='btn'>Click me</button>
  <img id='img' src="https://images.unsplash.com/photo-1591160690555-5debfba289f0?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80" alt="">
</div>
Posted by: Guest on September-25-2021

Browse Popular Code Answers by Language