css3 - CSS: Style a link in a class -
i have < div > that's styled using class. want style links in . tried this:
.categoryname { border: 1px solid black; padding-left: 10px; padding-bottom: 10px; border-radius: 5px; } .categoryname a:link { color: black; text-decoration: none; font-weight: bold; } .categoryname a:visited { color: black; text-decoration: none; font-weight: bold; } .categoryname a:hover { color: green; } .categoryname a:active { color: green; }
thought work has no effect whatsoever. tried google answer find info styling links in general, not ones in < div > class.
as can see here, work. http://jsfiddle.net/jeffman/44x3r/
in addition campari's suggestion, sure div tag uses categoryname
class name, not id?
here's html used.
<div class="categoryname"> <a href="#">link</a> </div>
Comments
Post a Comment