@chrisdh80
Submitted
Im fairly new to HTML and CSS and enjoyed learning flexbox. Any comments or feedback regrding code is much appreciated.
@ctrl-brokencode
@chrisdh80
Submitted
Im fairly new to HTML and CSS and enjoyed learning flexbox. Any comments or feedback regrding code is much appreciated.
@ctrl-brokencode
Posted
Hello! Congrats on uploading this challenge. I hope you don't discourage now and I hope you continue coding and learning from your mistakes. You will go far! Here are some suggestions I've made for you. Make sure to pay attention!
<br>
tags in <h1>
and <p>
. The text will adjust according to the size of the component;On CSS:
.container
selector with the tag body
, as it will be the body of the project. It's optional, you can continue with the div.container if you want. (If you actually replace it, take the div.card
out of the div.container
in HTML file);display: flex
, change flex
for grid
to center the component later;width
of the body, as it can cause side scrolling on smaller devices. The component should already be centered;justify-content: center;
and align-items: center;
to place-items: center
. It will only take up one line and will have the same effectIt should look like this:
body {
display: grid;
height: 100vh;
background-color: hsl(212, 45%, 89%);
place-items: center;
}
As for the card:
display: flex;
flex-direction: column;
align-items: center;
height
. Remember that the height in the component will automatically be determined by the its content;.card {
flex-direction: column;
width: 300px;
background-color: white;
padding: 1rem;
border-radius: 1rem;
text-align: center;
}
And you're pretty much done! Overall, your code is simple and easy to read. I wish you the best of luck!
Marked as helpful
@sgr-web-dev
Submitted
@ctrl-brokencode
Posted
Hello! Congrats on uploading this challenge. I hope you don't discourage now and I hope you continue coding and learning from your mistakes. You will go far! Here are some suggestions I've made for you. Make sure to pay attention!
Then make some adjustments on the paragraph content, like margin and padding, and you're done! Overall, your code is simple and easy to read. Again, careful with indentations. I wish you the best of luck!
Marked as helpful