@thomaspaysac
Submitted
The Javascript is working but I'm not satisfied with the code, is there any way to optimize it ? I tried using a for loop to highlight the selected rating and deselect the others, but I couldn't get it to work.
@TH3RIV
@thomaspaysac
Submitted
The Javascript is working but I'm not satisfied with the code, is there any way to optimize it ? I tried using a for loop to highlight the selected rating and deselect the others, but I couldn't get it to work.
@TH3RIV
Posted
Hi, @stagnant-sys!
There's no need to use JS for highlighting a selected option. You can use radio buttons instead of divs with the same name so only one can be selected at a time.
Then with CSS you hide them and style the labels, so whenever you select a label it selects the button and if you pick a different one, it deselects it.
JavaScript is only needed to switch between Select and Thanks screens (eventListener
) and to show the selected value (for
loop).
You can look at my solution for a better idea on what I mean.
Hope this helps!
Marked as helpful
@doyin156
Submitted
Please feel free to point out any errors or suggestions on things I could have done better. I would love for you to share with me things you learned through years of experience that could make me better at writing codes. Please feel free to drop any resources you think could be helpful. Thanks.
@TH3RIV
Posted
Hi, @doyin156!
Your project is not far from being finished, here's a few suggestions to make it even better:
main
tags and your attribution should be wrapped within footer
tags.Light gray: hsl(212, 45%, 89%)
.h3
without a h1
. Headings are supposed to follow the hierarchy (h1 > h2 > h3 > etc...). In this case it should be a h1
element. You can adjust the font size with CSS.margin
to center your objects. For centering your card I would suggest looking up "Flexbox".px
values as much as possible and use rem
instead.Hope this helps!
Marked as helpful
@Lubka024
Submitted
@TH3RIV
Posted
Hi, @Lubka024!
Your card looks great!
There's no need or is almost impossible to get it 100% accurate without the actual design files that give you all the margins and paddings etc, so don't worry about it as long as it looks close. Now onto a few suggestions for future improvement:
main
tags, so it is easier to read the code and screen readers know what is the main content. Landmarks are important.px
values and use rem
instead.Hope this helps!
Marked as helpful
All Feedback is welcome, thank you.
@TH3RIV
Posted
Hi, @CarolinaVrl!
Your card looks great! There's only a few suggestions I can make for future improvement:
main
tags or footer
tags. That way screen readers will have easier time figuring out what it is.px
values and use rem
instead.max-width
for the card is enough. The rest can be adjusted with margins or padding on the parent.Keep up the good work! Hope this helps!
Marked as helpful
@iulias17
Submitted
I struggled a little with the responsiveness of the page. If I shrink the page too much, the position of the thumbnail is not centered anymore. Any tips on that? Feedback is highly encouraged and appreciated. Thanks :) !
@TH3RIV
Posted
Hi, @iulias17!
I believe it has something to do with position
property on your <div class="avatar">
. Why not keep in the middle of the card and then center the image within the div.
Can't think of any other reason for that behaviour.
Hope it helps!
@Nunamniroi
Submitted
In general, I'm not sure that I used the best practices when creating the site, and I don't know what could have been done better. I will be grateful for the feedback
@TH3RIV
Posted
Hi, @Nunamniroi!
Your card is nearly done, it could use a few adjustments:
main
tags. Makes it easier to understand the code and helps screen-readers to figure out your main content.header
element as it is part of your card. Just wrap your whole card in a container element:<div class="card">
<div class="first-section">
Section code...
</div>
<div class="second-section">
Section code...
</div>
<div class="third-section">
Section code...
</div>
</div>
<p>
element, just use text of whatever you want it to say.body
, you can always limit the size of your elements within the body
.max-width
property and you can center your card within the page using flexbox on your body element.border-radius
property. And if it's not showing, you use overflow: hidden
.px
values and use rem
values instead.Hope this helps! You got this!
Marked as helpful
@ahmedd-osama
Submitted
@TH3RIV
Posted
Hi, @ahmedd-osama!
Your work looks great, but I have a few suggestions to make it even better:
main
tags and your attribution should be wrapped within footer
tags.px
values as much as possible and use rem
instead.Hope this helps!
Marked as helpful
@sohailmahmoud17
Submitted
All comments are welcome. If you have a better solution, let me know, please.. thanks
@TH3RIV
Posted
Hi, @sohailmahmoud17!
Your project looks great! I even took some inspiration from this to work on my background-image
positioning. Thanks! Now onto suggesting to make it even better, you can add JS to it to make it more fun! You can check out my solution to see it in action.
Keep up the good work!
@cruz-jerwin15
Submitted
Good day. I am more likely a backend developer. I take on the challenge because I want to be a full-stack developer. Please give me any tips on how to start being a front-end developer. Your comments are highly appreciated. Thank you in advance.
@TH3RIV
Posted
Hi, @cruz-jerwin15!
To answer your question on how to start being a Front-End developer, it all starts with educating yourself. I would suggest a course on "Udemy" made by Colt Steele or taking on the steps from "FreeCodeCamp" or both. That is what i am currently doing. Also helps to learn to do challenges here. I believe that you learn the most by doing it and making mistakes.
Now onto your project and my suggestions:
main
tags and your attribution should be wrapped within footer
tags.px
values as much as possible and use rem
instead.Hope this helps!
Marked as helpful
@sankalp414
Submitted
This is my first challenge solution in front end mentor platform .I have made a responsive qr-card component . Any feedback about this will be appreciated
@TH3RIV
Posted
Hi, @sankalp414!
Your page looks pretty nice, but I have a few suggestions for you:
main
tags and your attribution should be wrapped within footer
tags.px
values as much as possible and use rem
instead.Hope this helps!
Marked as helpful
@superuser2345
Submitted
I have found it difficult to give my divs full page heights. I will be grateful to get a solution to this.
I want to know the basics of Web Designs need to be consider everytime we make one?
@TH3RIV
Posted
Hi, @superuser2345!
I have a few suggestions for you:
main
tags and your attribution should be wrapped within footer
tags.px
values as much as possible and use rem
instead.Hope this helps!
Marked as helpful
@ralphvirtucio
Submitted
I notice that when hovering my Learn More button my whole content is slightly moving up ? Why is that happening? I try googling but I can't find any answer.
@TH3RIV
Posted
Hi, @ralphvirtucio!
Your content is not moving up, your whole container is expanding and that is because you are adding 2px
border on button:hover
. This then expands your whole container. Move the border
property from the :hover
state to the button itself and that should fix it.
Hope this helps!
Marked as helpful