I have many issues with my code, 1st how can I make it so all the inputs/txtarea have the same colored border(ex brown), and when the user clicks on it, it stays brown, only after the user moves on to the next input it changes to red or green. 2nd I learned in the last couple theories how to style radio button by giving them an appearance of none and styling them with the :before, but here they said to use .radio group input[type=“radio”]:checked {} this didn’t do anything except the box shadow.
As you see, the appearance: none removes the default styling of the radio, than the attributes creates a radio very similar to the default.
Like border-radius: 50%; and same width and height makes it a round and border added too.
This is an example right from the Lab of use of appearance: none.
I have .input-info and textarea borders set to burlywood, when in focus set to green and when invalid set to red, but they are red at the start bcz when empty they are invalid.
Now for the radio buttons this is what it says to do:
15. You should use the :checked pseudo-class on .radio-group input[type="radio"] to add a border color when the radio button is selected.
16. You should use the :checked pseudo-class on .radio-group input[type="radio"] to add a background color when the radio button is selected.
17. You should use the :checked pseudo-class on .radio-group input[type="radio"] to add a box shadow when the radio button is selected.
18. You should use the :checked pseudo-class on radio buttons to change the text color of the associated label when the option is selected.
and that’s exactly what I did, and when I run the test it says it’s true, it didn’t say to do it like in the picture you sent (I did that in the last workshop on how to make custom radio btns)
here’s my updated code for fixing the radio button, I just think the instructions on the lab project were a bit confusing about the radio button. As you can see I commented out the old code to show the difference, but I still don’t know how to fix my borders issue (I want all borders to be brown, when focused they should be green and after the user moves to another input it changes color to red if its invalid or stays green if it’s valid)
how should I use the outline property? The borders are visible, here’s what’s happening: the borders are red before focusing on them bcz by default the empty inputs are invalid and required, if I remove the required attribute they become green bcz they are valid. I don’t want the inputs to validated while empty, I want them to be after the user tries to type something in them, so by default all borders should be burlywood and when the user types something in them then they change color to red or green. Does that make sense?
last time I was experimenting I had found out that the border was hidden below the outline, if this is not your experience you can disregard my suggestion with the outline
The borders are red before focusing on them bcz by default the empty inputs are invalid and required, if I remove the required attribute they become green bcz they are valid. I don’t want the inputs to validated while empty, I want them to be after the user tries to type something in them, so by default all borders should be burlywood and when the user types something in them then they change color to red or green. Does that make sense?
Now I understand the issue, yeah, not something that can be fixed that easily valid/invalid state gets precedence on everything else
it’s probably something that needs JS yeah, you will find in the JS cert an other lab with a form, where you can experiment with this using JS once you reach that part