Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

HTML, CSS, SASS & JAVASCRIPT

Bishal Mallickβ€’ 115

@bishalmallick

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


PLEASE PROVIDE SOME FEEDbACK ON MY JAVASCRIPT... IT WILL bE VERY HELPFUL TO HAVE YOUR INSIGHTS... AND PLEASE SUGGEST ME A WAY TO CHANGE THE COLOR OF THE PLACEHOLDER WHN AN ERROR IN THE EMAIL OCCURS...

Community feedback

Faris Pβ€’ 2,810

@FarisPalayi

Posted

You can use the ::placeholder CSS pseudo-element to change the color of a placeholder in CSS

::-webkit-input-placeholder { color: red } // πŸ‘ˆfor webkit browsers like chrome
::placeholder { color: red }

Since you can't really select pseudo-elements using JavaScript, create a class. Like this:

.placeholder-error::-webkit-input-placeholder { color: red }

Then, using JavaScript:

email.classList("placeholder-error")

Hope it helpsπŸ˜€

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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