In the markup example below, I'm using the anchor element to wrap the contents of the li. This gives me lots of flexibility for rollover effects and a large hit area to activate the link. However, one thing I'm struggling with is how to isolate the text color change and text-decoration hover behaviors so that they do not alter the contents of the "post-entry" paragraph element.
Here's the current css:HTML Code:<li> <a href="#" rel="bookmark" class="post-title">Post Title here. I only want this text to be highlighted and underlined on :hover. <span class="comment-count">0</span> <p class="post-entry"> <img src="test.png" alt="" /> This is the post description text. I don't want it to respond to the hover css of the "post-title" element. </p> </a> </li>
Code:a.post-title:hover {color:blue;text-decoration:underline} a p.post-entry:hover{color:none !important;text-decoration:none !important}



Reply With Quote



Bookmarks