0
.box {
height: 42px;
width: 800px;
background: aliceblue;
}
.inside-box {
height: 42px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.icon-box {
width: 24px;
height: 24px;
background: url('https://i.ibb.co/31yyBQv/download-icon.png') center no-repeat;
}
<div class="box">
<div class="inside-box">
<div class="icon-box"></div>
<a href="#">Fazer Download</a>
</div>
</div>
I would like to know how I do for the DIV (.Inside-box) to be on the edge of the "Download" text, without it inheriting the width of the parent DIV (.box). If anyone has a solution I’d appreciate it!
use relative measures in %
– Samuel Ives
the problem is not the size, it inherits the width of the DIV with the class "box", I want it to be limited to the text or link "Download"...
– user106463