HTML code:-
<p><input type="text" placeholder="Enter your username"></p>
CSS code:-
.main-header input
{
width: 90%;
padding: 1rem;
margin: 20px 0px;
border: none;
border-bottom: 4px solid #5f5fb0;
font-size: 1.3rem;
background: transparent;
outline: none;
}
::-webkit-input-placeholder
{
color: #fff;
}
I am struggling to change the text color to white (#fff) in the user input box on my webpage using HTML and CSS. Despite multiple attempts, I have not been successful in achieving this. If anyone can offer assistance or a solution to this issue, it would be greatly appreciated.
Please assist me in resolving this problem.