html - Is it possible to do change on property of a different element from textbox focus event using CSS? -


i want show tool tip on text box focus

#tooltip  {      display:none;      height:50px;      width:50px;          background-color:red;     }    #tb1:focus #tooltip  {     display:block;  }
<input type="text" id="tb1">  <span id="tooltip">enter data</span>

but it's not working !!!

use adjacent selector (+) modify display element property

#tooltip  {      display:none;      height:50px;      width:50px;          background-color:red;     }    #tb1:focus + #tooltip  {     display:block;  }
<input type="text" id="tb1">  <span id="tooltip">enter data</span>


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -