Advertisement
badlogic

Div behind the input

Oct 25th, 2016
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.41 KB | None | 0 0
  1. .holder {
  2.     position: relative;
  3. }
  4. .dropdown {
  5.     position: absolute;
  6.     border: 1px solid red;
  7.     display: none;
  8. }
  9.  
  10. input:focus + .dropdown {
  11.     display: block;
  12. }
  13.  
  14.  
  15.  
  16. <div class="holder">
  17.     <input type="text" />
  18.     <div class="dropdown">
  19.         <p>Testing</p>
  20.         <p>Css ONLY</p>
  21.         <p>Dropdown</p>
  22.     </div>
  23. </div>
  24.  
  25. //source http://jsfiddle.net/gx8f2zeu/
  26.  
  27. just like facebox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement