[Solved] Buttons should Inherit parent div width [closed]


You can simply use flex by adding display:flex to container and then set flex:1 to buttons. You need to also set position:relative on the main container since you are using position:absolute.

.pro-box {
  height: 416px;
  overflow-y: hidden;
  padding: 6px 6px 0 6px;
  background-color: #4dbaef;
  color: #fff;
  position:relative;
}

.pro-box>img {
  display: block;
  margin: 0 auto;
  margin-bottom: 15px;
  background-color: #fff;
  width: 100%;
  height: 242px;
}

.btn-pro {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Roboto Regular', sans-serif;
  font-size: 13px;
  background-color: #339dd1;
  border-radius: 0;
  color: #fff;
  padding: 12px;
  margin-right: 2px;
  transition: 0.3s;
}

.pro-box>.btn-group {
  position: absolute;
  display:flex;
  bottom: 0;
  left:0;
  right:0;
  box-sizing:border-box;
}
.pro-box>.btn-group > .btn {
  flex:1;
  box-sizing:border-box;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="col-lg-3">
  <div class="pro-box">
    <img src="http://via.placeholder.com/300" alt="" class="img-responsive">
    <h4 class="pro-name">MAQ03422</h4>
    <p class="pro-desc">Titanium Delicate Touch Microvascular Needle Holders Needle Holders and Passers</p>
    <div class="btn-group" role="group">
      <a href="#" class="btn btn-pro">Tray</a>
      <a href="#" class="btn btn-pro">cart</a>
      <a href="#" class="btn btn-pro">compare</a>
    </div>
  </div>
</div>

1

solved Buttons should Inherit parent div width [closed]