Submitted
Using React to finish challenge
- HTML
- CSS
- JS
@vuson1709
Submitted
Submitted
Submitted
background
?Submitted
I have several issues when finish this project
media
queries and offset (left, top,...). If the width is less than 375px then that element becomes weird.Submitted
In App.js
, I use this approach to change from illustration-sign-up-mobile.svg
to illustration-sign-up-desktop.svg``` when
width > 800px`. But I am not sure if this is a good solution because:
function Banner() {
return window.screen.width > 800 ? (
<img src={BannerDesktop} alt="Banner Desktop" className="banner-desktop" />
) : (
<img src={BannerMobile} alt="Banner Mobile" className="banner-mobile" />
);
}
Submitted
Submitted
I have issue when choosing color. In style-guide.md
of the project, it requires me to use these color:
:root {
/* ### Primary */
--orange: hsl(25, 97%, 53%);
/* ### Neutral */
--white: hsl(0, 0%, 100%);
--light-grey: hsl(217, 12%, 63%);
--medium-grey: hsl(216, 12%, 54%);
--dark-blue: hsl(213, 19%, 18%);
--very-dark-blue: hsl(216, 12%, 8%);
}
When apply color for numbers, I tried all colors above but can't use correct color as in design
images.
Submitted
Submitted
Two sentences above are in the same <p>
. I don't know how to break these two in separated line (for desktop view) and combine them into a single line (for mobile view)
It takes me nearly 200 lines of code to finish the project. How can I write it in more simple way?
This is the 3rd projects and I don't know the best way to center the container (whole component). My only solution is to write like this and pray it works. However, using flex on <body>
, I want the component to be bigger (for the width) but I can't because the width of component is fixed at 714px. I set the flex item <container>
with max-width: 1000px;
but it won't grow any more than 714px.
body {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.container {
max-width: 1000px;
}
Thank you guys for the feedbacks.
Submitted
I have problem with height. For other projects, I remember I don't set height for flex's container because I thought the flex container will take up all width and height of the page (not flex items). But for projects on Frontend Mentor, I have to set height of flex container height:100vh;
.container { height: 100vh; /*I don't know that I have to set this so that my flex can be in the middle of page*/ display: flex; justify-content: center; align-items: center; flex-wrap: wrap; }
Submitted
width: 100%
or max-width:100%
for <img>
tag.<div>
to wrap outside <img>