Hi,
When you tell an anchor to have a dotted underline it gets a dotted underline. Selectors aren't physic and won't suddenly not underline an anchor just because it contains an image.
Remember that the image is inside the anchor and the styling is on the anchor, so therefore addressing the image has no effect on the anchors styles. It may as well be just a different word as far as the selector goes.
You will need to apply a class to the anchor or the p wrapper to do this properly.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style>
body{
color:#000000;
font-family:Verdana;
font-size:0.6em;
}
.entry a{
color:#15A1DC;
border-bottom:1px dashed #6CC509;
text-decoration:none;
}
.entry a:hover{
color:#fff;
background:#15A1DC;
border-bottom:0px;
}
.entry a img{
border:none;
}
.fbook a,.fbook a:hover{border:none;background:#fff}
</style>
</head>
<body>
<div class="entry">
<p>blah blah blah <a href="http://google.com">test</a> blah blah blah</p>
<p class="fbook"><a href="http://google.com"><img src="http://i2.sitepoint.com/graphics/flipbook.jpg" title="test" alt="" /></a></p>
</div>
</body>
</html>
Now having said all that above - there actually may be an easy fix in some cases and you can try this first but it depends on what else is going on in your layout. Just set the image to display:block or float:left.
Code:
.entry a img{
border:none;
display:block
}
That should make the image hide the border but it does depend on how your layout is structured.
Bookmarks