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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -