3
I created an image with the effect of hover
which shows a listing on top of it when passing the mouse, only that 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 the problem is in . css where
div a {
ul li {
ul li:hover {
ul li:hover ul {
ul li ul {
They’re changing the entire layout, it would be possible to make this code be interpreted only in this image?
If not, how do I pass these css lines to only work in the photo? I tried to put id in the div but I can’t do the effects on .css
amend the list.
Our many thanks I even understood using the class div and isolate but I wasn’t doing it right so it has how to do . divComImagem ul li ul li { :)
– Marcos Vinicius