@ziy-eg
Posted
instead of
<body>
<section>
<div class='box'>
<section class = 'box1'>
<a href="https://imgbb.com/"><img src="https://i.ibb.co/vkFLCm7/frame.png"></a>
</section>
<h2>Improve your front-end skills by building projects.</h2>
<p class='description'> Scan the QR code to visit Frontend
Mentor and take your coding skills to the next level. </p>
</div>
</section>
</body>
Try using:
<body>
<main class="box">
<div class ="qr-code">
<a href="https://imgbb.com/">
<img src="https://i.ibb.co/vkFLCm7/frame.png">
</a>
</div>
<h2>Improve your front-end skills by building projects.</h2>
<p class="description">
Scan the QR code to visit Front-end Mentor and take your coding skills to the next level.
</p>
</main>
</body>
it's much easier.
as for centering the card:
.box {
position: absolute;
top: 50%;
left: 50%;
transform: translate (-50%, -50%);
}
Marked as helpful
@albarbsilva
Posted
@ziy-eg thanks, I'll apply it to my code!