@correlucas
Posted
πΎHello Yusuf, congratulations for your first solution and π welcome to the Frontend Mentor Coding Community!
Your solution is almost finished you've to fix only two things, the background and the alignment, here is my tips for you:
First of all use the correct color for the background:
body {
background: hsl(212, 45%, 89%);
}
My advice for your is to use flexbox
to create this alignment. For example, first of all add to the body
min-height: 100vh
to make the body display 100% of the browser screen size and display: flex
e flex-direction: column
to align the child element (the container) vertically using the body as reference.
body {
display: flex;
min-height: 100vh;
background-color: lightgray;
place-content: center;
align-items: center;
justify-content: center;
}
π I hope this helps you and happy coding!
Marked as helpful
@owocoded
Posted
@correlucas after setting the body as flex the mobile view is scattered again, pls help out
@correlucas
Posted
@owocoded is the preview site updated I cannot see the error, give me more details this way I help u
@owocoded
Posted
@correlucas yes, it's updated u can check using your mobile phone to see the error.
@owocoded
Posted
@correlucas yes, it's updated u can check using your mobile phone to see the error.
@correlucas
Posted
@owocoded Try to do these changes to avoid the error with the container scaling, instead of margins give it a max-width
for the size:
#bg {
background-color: white;
border-radius: 2%;
max-width: 700px;
/* margin-top: 4%; */
/* margin-bottom: 2%; */
/* margin-left: 36%; */
/* margin-right: 36%; */
max-width: 340px;
}
Marked as helpful
@owocoded
Posted
@correlucas http://GitHub.com/owocoded/QR-code.git My git repository
@owocoded
Posted
@correlucas Thanks so much, it fit in now.