Hei ,
Following is my html code and css . I dont want to display border on picture if user has not uploaded picture in article. Now my code is not hard coded in html file and thats why image tag is also displaying for every short article .If some articles have not picture border is still showing because i have style for it.
I dont want to display border if user has not uploaded any picture. How can i achieve this using jquery .Any idea.
<div class="ShortAticle">
<div class="ShortArticlePicture">
<a href="#"> <img alt="Title" src="/images/viewimage.aspx?id=ArticlePicture" /></a>
</div>
<div class="ArticleText">
<h3>Title</h3>
</div>
</div>
CSS:
.ShortArticlePicture img {
border: 1px solid #cccc;
}
Try the following style, it will show border only if
srcattribute is present