Hello Will
I have a vb.net site and I would like to show a div when someone hovers over an element using CSS (not javaScript). Can you help me?
Earl Walker from Washington DC
Hello Will
I have a vb.net site and I would like to show a div when someone hovers over an element using CSS (not javaScript). Can you help me?
Earl Walker from Washington DC
Comments are closed.
Hello Earl
Assuming HTML4, with this layout:
< a >Hover over me!< /a >
< div >Stuff you want to show< /div >
You can do something like this:
div {
display: none;
}
a:hover + div {
display: block;
}
This uses the adjacent sibling selector. However this is a very general solution which would hide all you div tags. You probably want to assign the div tag a class and use that in the CSS
In HTML5 you can anchor elements to wrap almost anything, so in that case the div element can be made a child of the anchor.
Hope that helps
Will