I have the code that is presented below, what I want to do is that the box on the right measures the same as the first (in height), and that the texts of both are attached to
bottom
their respective box.
NOTE: This code, in my project, is inside the tag <header>
, and in the browser I see the boxes of the same size. I don't understand why in the SO snippet one is bigger than the other. In my case I see them the same, but I can't adjust the text below.
WHAT I TRIED: Putting the boxes on the outside position: relative
and the one on the inside absoluta; bottom:0px
, it partly works but it throws one box on top of the other and it's not what I'm looking for.
AND YES IT IS POSSIBLE: In addition to that, I would like the proportions of the distance between box and box to be maintained when changing resolution. In my case I have a connected monitor with a resolution of 1280x720 and the screen of the note in 1920x1080, and when I drag the browser from one monitor to the other the distances are not respected.
.filter-content {
margin-left: 1vw;
float: left;
border: 1px solid black;
height: 80%;
}
.logo-holder {
display: inline;
float: left;
margin-left: 1vw;
font-family: 'century';
font-size: 2.7em;
font-weight: 700;
color: #bbbbbb;
border: 1px solid black;
height: 80%;
}
<div class="logo-holder">
<div style="">
textodellogo
</div>
</div>
<div class="filter-content">
<div class="gallery-filters">
<a href="#" style="color:#bbbbbb; margin-right: 1em;" data-filter=".nature">beauty</a>
<a href="#" style="color:#bbbbbb" data-filter=".models">fashion</a>
</div>
</div>
I consider that:
display: flex;
with which we can move them on the horizontal axis80
flex-direction
indicating that it will now be a column type so that they are one on top of the other (the texts)justify-content
with a value offlex-end
Important
If you don't want the 2 box container to span 100% of the page then you can make these modifications:
width
custom example of50vw
justify-content
and have them settle to the leftEXAMPLE