I wanted to improve the implementation of the images and the number component of the page.
Listed below are my questions:
- What is the better way to implement the number component?
In my solution, I have a specific class called
.number
and I just plugged it to an element. Here is my code.
//CSS
.number {
display: grid;
place-items: center;
position: relative;
font-family: "Red Hat Display", serif;
font-weight: 900;
line-height: 1.5;
color: #87879D;
border: 1px solid #D1D1DF;
border-radius: 9999px;
width: 56px;
height: 56px;
}
.number::before {
content: "";
position: absolute;
top: -80px;
height: 80px;
border-right: 1px solid #D1D1DF;
}
//HTML
<p class="number main-content__number">01</p>
- What is a better way to handle the hero images?
I thought the images in the hero section are decorative, so I have used divs with background images. I could have used img tags with empty alt attribute but I find using divs easier.
Here is my sample code
// HTML
<section class="hero">
<div class="hero__img-mobile"></div>
<div class="hero__img-desktop--left"></div>
<div class="hero__text-content">...</div>
<div class="hero__img-desktop--right"></div>
</section>
I styled my div images using some CSS background properties and I just hide and unhide some of the images based on the screen width using CSS media queries.
-
What is a better way to implement the footer background image?
I have tried to match the footer image based on what's in the design but I wasn't able to achieve that. I think it is because of the provide image assets in the initial codebase provided.
-
How is my folder structure in this challenge?
Any suggestions and recommendations are also welcome.