How can I hide my div when input is in focus? I used this cod and it did not work for me.
.A:focus .B {
display: inline-block !important;
}
How can I hide my div when input is in focus? I used this cod and it did not work for me.
.A:focus .B {
display: inline-block !important;
}
You can do something like this:
div {
background: #f0a;
display: true;
height: 200px;
width: 200px; }
input:focus + div { display: none }
You can use classes or identifiers like this:
div.hidden {
background: #f0a;
display: true;
height: 200px;
width: 200px; }
input.focus:focus + div.hidden { display: none }
And then add the HTML like this:
<input class="focus" type="text" value="">
<div class="hidden"></div>