CSS Layers
Project details
I need help placing an image inside the center of a div with a max width and auto height not to exceed 90% of DIV
Something like this:
<style type=”text/css”>
.card
{
background-color: lightblue;
border-radius: 25px;
width: 300px;
height: 475px;
}
.cover
{
height: 0;
position: relative;
overflow: hidden;
}
.cover img
{
display: inline-block;
max-width: 280;
max-height: 280;
width: auto;
height: auto;
}
</style>
<div class=“card” align=”center”>
<div class=“cover” align=”center”>
<img src=“” />
</div>
</div>
Awarded to:

Denys I.
(5.0)
Awarded to:

Denys I.
(5.0)
Project details
Something like this:
<style type=”text/css”>
.card
{
background-color: lightblue;
border-radius: 25px;
width: 300px;
height: 475px;
}
.cover
{
height: 0;
position: relative;
overflow: hidden;
}
.cover img
{
display: inline-block;
max-width: 280;
max-height: 280;
width: auto;
height: auto;
}
</style>
<div class=“card” align=”center”>
<div class=“cover” align=”center”>
<img src=“” />
</div>
</div>