This is a solution to the Base Apparel coming soon page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- See hover states for all interactive elements on the page
- Receive an error message when the
form
is submitted if:- The
input
field is empty - The email address is not formatted correctly
- The
- Solution URL: Frontend Mentor
- Live Site URL: Github Pages
I learned css object-fit:cover;
stretches the image too much and decided use css object-fit: fill
instead. I created HTML input placeholder attribute with JavaScript.
.showcase img {
width: 100%;
max-height: 30rem;
object-fit: fill;
height: auto;
}
document.getElementById("email__input").placeholder = "Email Address";
Base Apparel Coming Soon page (custom version) - This solution inspired me to implement accessibility within the JavaScript code.