0

Hello i have tried everything, but still does not work, i have problems showing div2 on hover over div1.

<div id="div1">....</div>
<div id="div2" class="hidden"> ...</div>

and css:

.hidden{block:none;}

#div1:hover + #div2{
   display:block;
}

And for some reason div2 does not show on hover?

1 Answer 1

2

this is the CSS that you need

.hidden{
    display: none;
}

#div1:hover + #div2 {
    display: block;
}

your CSS

.hidden{block:none;}

is incorrect, change "block" to "display"

Sign up to request clarification or add additional context in comments.

2 Comments

typo here u have the exact code that i have #nadole{ display: none; } #art1:hover #nadole{ display: block; } where <div id="art1">...</div><div id="nadole">...</div>
well, based on your comment, you should have #art1:hover + #nadole{ display: block; } see the "+" between "#art1:hover" and "#nadole"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.