@Ajdevise
Posted
Try this selector to change color when content is added .form-input:not(:placeholder-shown).
Looking to hire developers?
Alright, my first attempt to adding JavaScript. It's not entirely there yet, but I wanted to show what I've done thus far, to learn from the feedback.
I'm also wondering how to change the input color of the input field once content is added. It now by default goes white, but I want it to keep the requested color. Which pseudo-class should I use?
@ApplePieGiraffe
Posted
Hey there, Katrien S! 👋
Nice to see you complete another challenge! 😀 Well done on this one! 👍 Overall, your solution looks great and responds well.
I suggest,
max-width
to the content of the page to prevent the left/right parts of the design from having too much space in between each other on extra-large screens.BTW, another pair of pseudo-classes you might be interested in looking into are the :valid
and :invalid
pseudo-classes, which correspond with valid and invalid input being entered into an input field, respectively. You can combine them with the :focus
pseudo-class to apply styles to the input element only when it is focused and the input inside it is valid, for example. 😉
Keep coding (and happy coding, too)! 😁
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