@erratic-enigma
Posted
Hello! Nice work on the solution; looks really good!
I'm not too familar with Tailwind, so I'm unsure about how to address the seperate hovering issue on the <svg>
elements.
For the second question, in your JavaScript, you add and remove the text within the error message <p>
on these lines:
11: errorMessage.textContent = "Please enter a valid email adress";
19: errorMessage.textContent = "";
The text content inside the <p>
element sets its height, which in turn changes the height of the parent <div>
element.
Instead of adding and removing the text content, you could instead apply a visibility style like so:
11: errorMessage.style.visibility="visible";
19: errorMessage.style.visibility= "hidden";
The visibility
CSS property hides or shows an element without removing it from the document flow, which in this case means the height will be retained.
Hope this helps! 😃
Marked as helpful
@VickyAzola
Posted
It worked, thanks! @erratic-enigma