Home › Forums › CSS › How to open a div on click of a search button exactly below the search box. › Reply To: How to open a div on click of a search button exactly below the search box.
August 11, 2013 at 3:56 am
#146377
Participant
You could apply a hover effect to the submit button with CSS, something like this:
If you just use the Active state, it will only be visible when the button is pressed down. You would still need a little bit of javascript if you want the maps div to stay open after they release the mouse button.
.testbox {
background-color: #FF0;
padding: 15px;
height: 50px;
width: 200px;
display: none;
}
.testbutton:hover + .testbox, .testbutton:active + .testbox {
display: block;
}