@henoceli3
Posted
C'est bien, mais évite d'importer quand tu ne veux pas utiliser. Good Job 💪
Marked as helpful
@Junious1
Posted
@henoceli3 merci tout a été modifié
@Hassiai
Posted
Replace<div class="main-code">with the main tag, <p class="first"> with <h1> and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
Give .text a margin value for all the sides, text-align: center and a font-size of 15px which is 0.9375rem, this will be the font-size of both p and h1. Give p a margin-top or h1 a margin-bottom value for the space between the text.
There is no need to style. image, give the img a max-width of 100% for a responsive image and a border-radius value, the rest are not needed.
There is no need to give the body a background-color of white.
Replace the height in .main-code with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement. padding: 16px
For a responsive content, give .main-code a a fixed max-width value. max-width: 320px
To center .main--code on the page using flexbox or grid instead of position: absolute, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
USING FLEXBOX:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
USING GRID:
body{
min-height: 100vh;
display: grid;
place-items: center;
}
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful
@Junious1
Posted
@Hassiai thanks for your help
@atif-dev
Posted
Hi Junious, congrats🎉 on completing the challenge. Better take care about following points.
<body>
<main>
---your code here----
</main>
<footer>
</footer>
</body>
(why main
matters? Read here)
body {
min-height: 100vh;
display: grid;
place-content: center;
}
Or you can learn centering from here.
height: 55vh;
from .main-code
selector for better display of bottom text.Hope you will find this Feedback Helpful.
Marked as helpful
@Junious1
Posted
@atif-dev thanks for your help
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord