Change font-size of label and input element's while hovering - HTML using CSS -
html: <fieldset> <legend> xxx </legend> <label for="photo"> photo </label> <input type="file" name="photo" id="photo"> <br> <label for="imagepreview"> preview: </label> <img id="preview"> </fieldset> css: // 1. in order, input:hover works. label:hover { font-size: 25px;} input:hover { font-size: 20px;} // 2. in order, label:hover works. input:hover { font-size: 20px;} label:hover { font-size: 25px;}
i asked both should resize font-size.
eg: hovering on label, should change font-size. hovering on input, should change font-size well.
why not both changing font-size? how can achieve it?
fieldset { font-size: 20px;} label:hover , input:hover { font-size: 25px;}
<fieldset> <legend> xxx </legend> <label for="photo"> photo </label> <input type="file" name="photo" id="photo"> <br> <label for="imagepreview"> preview: </label> <img id="preview"> </fieldset>
Comments
Post a Comment