Debug School

rakesh kumar
rakesh kumar

Posted on • Updated on

CSS: How to positioning button clickability

yesterday when i trying to click button on corner it is clickable but when i trying to click middle it is not clickable

Image description
my code is

         <div class="button" >
                        <button style="border: 1px solid #09b3e7; "> <a  href="{{ url('influencers/'.$item->slug) }}"><b style="color:#047da1;"class="fas fa-user-alt">&nbsp;View
                                Profile</b></a></button>
                         </div>
Enter fullscreen mode Exit fullscreen mode

Solution

        .button {
  display: inline-block;
  text-align: right;  /* Ensures the container takes up only the necessary width */
}

.button-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none; /* Remove default link styling if needed */
}
Enter fullscreen mode Exit fullscreen mode
   <div class="button" style="float:right">
                        <button style="border: 1px solid #09b3e7; "> <a  href="{{ url('influencers/'.$item->slug) }}"><b style="color:#047da1;"class="fas fa-user-alt">&nbsp;View
                                Profile</b></a></button>
                         </div>
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Summary

see display,text-align,height,width

Top comments (0)