I created an image with hover
effect that shows a listing on top of it when mouseover, but the code is changing the entire layout.
CSS:
div a {
text-decoration: none;
color: white;
font-size: 23px;
padding: 0px;
display:block;
}
ul {
display: block;
float: left;
margin: 0;
padding: 0;
}
ul li {
display: inline-block;
}
ul li:hover {
display: block;
background: #EA3F3F;
}
ul li:hover ul {
display: block;
}
ul li ul {
position: absolute;
width: 220px;
display: none;
}
ul li ul li {
background: #555;
display: inline;
font-size:23px;
font-weight:bold;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
opacity:1;
}
ul li ul li a {
display:block !important;
}
ul li ul li:hover {
background: #475DDA;
}
HTML:
<div>
<ul>
<li>
<img align='left' src='http://oi58.tinypic.com/2lxrh2.jpg' />
<ul>
<p>
<li> <a href='#'>0 - 9</a>
</li>
<li> <a href='#'>A - C</a>
</li>
<li> <a href='#'>D - F</a>
</li>
<li> <a href='#'>G - I</a>
</li>
<li> <a href='#'>J - L</a>
</li>
<li> <a href='#'>M - O</a>
</li>
<li> <a href='#'>P - R</a>
</li>
<li> <a href='#'>S - U</a>
</li>
<li> <a href='#'>V - X</a>
</li>
<li> <a href='#'>Y - Z</a>
</li>
</p>
</ul>
</li>
</ul>
</div>
I understand that the problem is in .css where
div a {
ul li {
ul li:hover {
ul li:hover ul {
ul li ul {
Are changing the entire layout, could you make this code to be interpreted only in this image?
If not, how do I pass these css lines to work only in the photo? I tried by id in the div but I can not make the effects on%% change the list.