6
Next, I always looked for a solution to this type of problem, but never found. I have the following codes.
<style>
.allboxframes {
margin: 0 auto;
max-width: 100%;
}
.box-frames {
margin: 0 auto;
float: left;
padding: 5px;
width: 250px;
height: 250px;
}
.frames{
width: 240px;
height: 180px;
margin: 0 auto;
}
</style>
<div class="welcome-banner">
<div class="banner-content">
<div class="allboxframes">
<div class="box-frames">
<div class="frames">
<span id='wrapper'> <iframe id='scaled-frame' scrolling="no" src=''></iframe></span>
</div>
<br />
<center>
<div class="button">
<a href="" target="_blank">Rede LAN</a>
</div>
</center>
</div>
<div class="box-frames">
<div class="frames">
<span id='wrapper'> <iframe id='scaled-frame' src=''></iframe></span>
</div>
<br />
<center>
<div class="button">
<a href="" target="_blank">Rede Segurança</a>
</div>
</center>
</div>
<div class="box-frames">
<div class="frames">
<span id='wrapper'> <iframe id='scaled-frame' src=''></iframe></span>
</div>
<br />
<center>
<div class="button">
<a href="" target="_blank">Rede WAN</a>
</div>
</center>
</div>
<div class="box-frames">
<div class="frames">
<span id='wrapper'> <iframe id='scaled-frame' src=''></iframe></span>
</div>
<br />
<center>
<div class="button">
<a href="" target="_blank">Rede DataCenter</a>
</div>
</center>
</div>
<div class="box-frames">
<div class="frames">
<span id='wrapper'> <iframe id='scaled-frame' src=''></iframe></span>
</div>

 <br />
<center>
<div class="button">
<a href="" target="_blank">Rede Convenios</a>
</div>
</center>
</div>
</div>
</div>
</div>
The allboxframes is the box where the div is inserted, and box-frames are the Divs that I centered, and aligns left by the float, but when decreasing the screen resolution, the frames remain aligned left, thus leaving a space on the right. I would like to know if there is a way to leave them centered on the page next to each other, as it is now, but by lowering the page, for example, three aligned to the center at the top, and two aligned to the center at the bottom. If possible.
I saw something about display: flex; but I don’t know how to use.
Thank you very much for your answer, Hugo. My problem has been solved. Thanks for the advice too, you’ve certainly contributed to my learning route. Good morning!
– Lucas Morse
@Lucasmorse, I’m glad you could help! Here’s a guide to Flex that can really help you understand the concepts https://css-tricks.com/snippets/css/a-guide-to-flexbox/
– hugocsl