3
How can I hide my div when the input is in Focus? I used this Cod and it didn’t work for me
.A:focus .B {
display: inline-block !important;
}
3
How can I hide my div when the input is in Focus? I used this Cod and it didn’t work for me
.A:focus .B {
display: inline-block !important;
}
2
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>
wow, I’ve never seen this method, really good anyway, I used onFocus="eventtipsignupnomefocus()" onBlur="eventtipsignupnomeblur()", this is very Manero
@flourigh css is amazing when you know how to use it..
@user3715916 because it’s a boy, I never tried to use it, because I’ve always made it with Javascript so I’ve never looked, but now I love this method that even works in many ways, very good, this is from CSS3? correct
@flourigh CSS2.
Browser other questions tagged css
You are not signed in. Login or sign up in order to post.
with css only this will not be possible, you will insert an onfocus into the input which is a javascript type pointing to a function and in this function you will create a css element for the div you want
– flourigh