Right now I have 2 div
with different ID
ones, one is called image with a redcolor
background and another is called logo with a blue background .color
I need the blue one not to overlap on top of div
the red one when it has a height of 390px, is there a way to do it without using any ... I know it's because of the , but how can we modify the structure so that this doesn't happen ...color
div
@media (min-width: 675px)
posicion Absolute
.content {
height: 60%;
margin-top: auto;
position: relative;
}
#image {
width: 350px;
height: 112px;
background-color: red;
}
#content-logo {
position: absolute;
bottom: 0;
text-align: center;
padding-bottom: 20px;
width: 100%;
}
#logo {
width: 140px;
height: 110px;
background-color: blue;
display: inline-block;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<div class="d-flex">
<div class="content-login vh-100 d-flex justify-content-center align-items-center" style="width: 60%;">
<div class="content">
<div id="image">
IMAGE
</div>
<div id="content-logo">
<div id="logo">LOGO</div>
</div>
</div>
</div>
<div style="width: 40%;">
<div class="align-items-center justify-content-center d-flex h-100">
<h1>HOLA</h1>
</div>
</div>
</div>
PS: I need them to div
keep the current position, ie the Blue div should be at the bottom centered and the Red div should stay centered
You can use
flex
withjustify-content: space-between
andflex-direction:column
.In your code it would look like this:
You can change the
position: absolute;
aposition: static;
in thediv id="content-logo"
like this:change the styles of
content-logo
, addposition: fixed;
only .I put 100% on
#logo
so that it occupies the entire screen