Check out these dummy employee cards. I like them. They make my page feel less empty. What I don’t like is their hard-coded dimensions
I’d like them to have the same proportions as the central employee card but have dimensions that are, say, 1.1 times smaller
I tried changing their width to auto
, but it made them disappear altogether
How do you think I should achieve this flexibility?
Here’s a code example (the actual code is more complicated)
<div id="user-tab" class="tab-pane container p-0 mx-auto active">
<h4 class="display-4 text-center mb-4">Your employee card</h4>
<div class="d-flex justify-content-around">
<div class="dummy-card shadow my-auto">
<div></div>
</div>
<div class="card shadow-lg">
<div class="card-header text-center text-secondary">
<h4 class="d-inline font-weight-bold">User User</h4>
<span> (user)</span>
</div>
<div class="card-body">
<ol>
<li><strong>Username: </strong><span>user</span>
</li>
<li><strong>Name: </strong><span>User</span></li>
<li><strong>Lastname: </strong><span>User</span>
</li>
<li><strong>Department: </strong><span>sales</span>
</li>
<li><strong>Salary: </strong><span>100000</span></li>
<li><strong>Age: </strong><span>19</span></li>
<li><strong>Email: </strong><span>[email protected]</span></li>
<li><strong>Role(s): </strong>
<span>U</span>
</li>
</ol>
<a class="btn btn-outline-primary" href="#">
Edit info
</a>
<a class="btn btn-outline-secondary" href="#">
Change password
</a>
</div>
</div>
<div class="dummy-card shadow my-auto">
<div></div>
</div>
</div>
</div>
.dummy-card {
width: 290px;
height: 310px
}
.dummy-card div:first-of-type {
background-color: rgba(0,0,0,.03);
height: 15%
}