<a href="#">
<img width="103" height="100" src="img source">
</a>
for the above html code I am using the following css
a {
border-bottom-style: dotted;
border-bottom-width: 1px;
}
a img {
border: 0 none;
}
Basically what I am trying to achieve here to underline the text links while keeping img links without any underline. however I guess by styling the text links I am also styling image links, I want any image in a link should not be underlined.
Can any one suggest work around for this?
The underline is caused by the text decoration on the a. So just apply
text-decoration:noneto the a.Edit: there is currently no CSS-only way to apply a style to “any
athat has animgas its child”. CSS does not have selectors for that. So you’ll either have to make theseas unique by giving them classes (or other attributes) and apply the CSS to those classes, or run some script that tests forimgs inas and gives thoseas the desired style.