HTML:
<fieldset>
<legend> YYY </legend>
<label for="photo"> Image </label>
<input type="file" name="photo" id="photo">
<br>
<label for="imagePreview"> Preview: </label>
<img id="preview">
</fieldset>
CSS:
// Attempt 1: Only input:hover changes font-size.
label:hover { font-size: 25px;}
input:hover { font-size: 20px;}
// Attempt 2: Only label:hover changes font-size.
input:hover { font-size: 20px;}
label:hover { font-size: 25px;}
I was tasked with making both elements change their font size when hovered over.
For example, hovering on the label should increase its font size, and hovering on the input should do the same.
Why aren't both elements changing font sizes? How can I achieve this?