Design comparison
Solution retrospective
Here are some things that I noticed that need improvement:
-
There is only a single bullet point.
-
The bullet point is not centraly.
-
I know I'm a mess with JavaScript. I really need to study more about it so I can be able to link the "success" part. It even didn't work within the mobile design.
-
Gradient hover effect. I tried to do a linear-gradient but for some reason if was not working.
-
On the desktop preview I somehow need to fix the excess of space/gap between the paragraph.
These are some of the things I know I need to improve. To be honest I am kinda ashamed I couldn't do a better job and to realize that my skills are still as a newbie. Guess it's really a journey to be a good web developer and now I realized that the learning and improving needs to be constant.
Of course I am open to suggestions and advice to improve my code and to better improve myself.
Community feedback
- @UrbanskiDevPosted over 1 year ago
Hello rowanDeveloper !
You should be proud of having finished the challenge. It may not be to your liking as it is now but with regular practice, you will become a better developer.
Some advice I can give you :
- Pay attention to the design, it may sounds obvious, but for example, you inversed the content of the newsletter, by setting up the image to the left instead of the right. You also have forgot the dark background color.
- For the border, you can use a border-radius property to make the corner of your box more rounded.
- For the Javascript part, I don't know if it was on purpose but you didn't add a validation for the email.
Here's an idea on how to do it :
// Step 1: Get the reference to the input element const emailInput = document.querySelector('.email-subscription'); // Step 2: Add event listener to detect input changes emailInput.addEventListener('input', function() { // Step 3: Validate the input using a regular expression for email const emailPattern = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/; const emailValue = emailInput.value.trim(); // Step 4: Update the CSS class based on validation if (emailPattern.test(emailValue)) { //email is valid } else { //email is invalid } });
If you don't know much about regex, I would recommend this resource to help you understand better regex : Learn_Regex
- For your bullet point problem, I think it is caused by an error in your HTML, you wrote this :
<ul class="content__bullets"> <li class="bullet-item"> <p class="paragraph_bullet">Product discovery and building what matters</p> <p class="paragraph_bullet">Measuring to ensure updates are a success</p> <p class="paragraph_bullet">And much more!</p> </li> </ul>
An <li> element should contain only one element, not three, which should give you something like this :
<ul class="content__bullets"> <li class="bullet-item"> <p class="paragraph_bullet">Product discovery and building what matters</p> </li> <li> <p class="paragraph_bullet">Measuring to ensure updates are a success</p> </li> <li> <p class="paragraph_bullet">And much more!</p> </li> </ul>
A link to learn more about li element : MDNDocumentation
About the gradient linear not working, it is because you didn't use the good property, you used :
background-color: linear-gradient(pink, red);
instead of using the property background, you should have thisbackground: linear-gradient(pink, red);
I give an other link about linear-gradient : MDN_Minear_Gradient
I think I have addressed most of your point, I hope my advice will be helpful to you.
Good luck in your learning journey as a developer and happy coding !
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
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