开发者

#div_iv a:hover not working

This may seem stupid to ask, but I have done on many css coding

#div_iv a:hover

but for darn reason, it does not seem to work now, Googled with results such as

a.hover #div_iv
#div_iv:hover

What exactly开发者_运维知识库 is wrong.

Thanks Jean


If you specify a style using #div_iv a:hover, you will see the effect in a code like this:

<div id="div_iv">
  <a href="#">My Link</a>
</div>

If it doesn't work, check in your CSS file if you do not override this declaration, by specifying another link style declaration after this one.


Remove the underscore from your CSS.

div#iv a:hover

Then HTML:

<div id="iv"><a href="URL">sometext</a></div>


The reason it was not working is because the id="div_iv" should have been in the href tag

darn me!!!


If you are trying to make something in the entire DIV, then use following code:

#divID div:hover

or, if it does not work,

div#divID div:hover

Then, use this HTML code:

<div id="divID">Enter stuff and <a href="link.html">links</a> here.</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜