I'm working on styling an unordered list where each list element contains a frame, background, and an image. I've set it up so that when you hover over a list element, the background changes to orange and the text turns white. However, I ran into an issue when I added links to external pages around the images within the li
elements - the text no longer changes to white when hovering, even though the background still turns orange. Removing the <a href ""></a>
parts fixes the text color but I need the links.
HTML
<ol id="selectable">
<li class="ui-state-list">
<b>Title</b>
Text here should change to white when hovering over entire li element.
</br>
<h5 class="discProd">More text</h5>
<a href="www.youtube.com">
<img class="iconAlign" src="images/icons/videoIcon.png">
</a>
</li>
</ol>
CSS
h6 {
font-size: 12px;
color: #2D2D2D;
font-weight: 100;
line-height: 1.5em;
}
.discProd {
font-size: 10px;
color: red;
}
#selectable {
list-style-type: none;
width: 900px;
}
#selectable li:hover {
background: orange;
color: white;
}
.ui-state-list {
border: 1px solid #d3d3d3;
background: #e6e6e6 url(../images/Products/productBG5.png) 50% 50% repeat-x;
/*searched bg gloss wave */
font-weight: normal;
color: #555555;
}
.iconAlign {
float: right;
margin-left: 34px;
margin-right: 8px;
margin-top: -.2em;
}