I am creating a page on which I have only access to CSS files.
I want to change the style of an input element if the value is not empty.
Here is what I still have ...
<input id="myInput" type="text" name="myInput" autocomplete="off" placeholder="Enter your Card Number">
and
input {
font-style:italic;
}
input:not([value='']) {
font-style:normal;
}
This does not work, although the text is not italicized.
Is this possible to achieve given that I can only edit the CSS file?
source
share