0
I have a system developed in Bootstrap of which I am using the following code to create a card based on work of Bootsnipp’s colleague:
<div class="card-base">
<div class="card-icon"><a href="#" title="Widgets" id="widgetCardIcon"><img src="fotos-usuarios/silhuetaHomem.jpg" class="imagecard"></a>
<div class="card-data widgetCardData">
<h2 class="box-title" style="color: #000;">FERNANDO PESSOA</h2>
<p class="card-block text-center">USUÁRIO<br>Acesso Padrão<br>Último acesso: 22/10/2017 às 11h11</p>
<a href="#" title="Alterar Senha" class="btn btn-primary col-sm-6 col-xs-12" style="background: #465768; border:#465768;"> <i class="fa fa-lock" aria-hidden="true"></i> Alterar Senha </a></div>
</div>
<div class="space"></div>
</div>
CSS
.card-base>.card-icon {
text-align: center;
position: relative;
}
.imagecard {
z-index: 2;
display: block;
positioN: relative;
width: 88px;
height: 88px;
border-radius: 50%;
border: 5px solid white;
box-shadow: 1px 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
margin: 0 auto;
color: white;
}
.card-base>.card-icon>.card-data {
margin-top: -24px;
background: ghostwhite;
border: 1px solid #e0e0e0;
padding: 15px 0 10px 0;
box-shadow: 1px 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
#widgetCardIcon {
background: #465768 !important;
font-size: 28px;
line-height: 78px;
}
So far so good, the result is this:
But when I try to change the attribute below:
class="btn btn-primary col-sm-6 col-xs-12"
See what happens:
DESKTOP VERSION
MOBILE (360x640)
My question is: How can I do so that in any display, the buttons keep the same height and position?
What exactly is your goal? that the button assume the maximum width on mobile?
– Diego Marques
Maximum width it picks up according to image 3. The goal is as I reported in the post: How can I make so that in any view, the buttons keep the same height and position?
– user24136