hide img tag if src is empty but without javascript/jQuery or css3
You can use [attr=val]
selector
img[src=“”]{display: none;}
The above selector will simply match, if the src attribute has no value.
Alternatively, if you want to reserve the space taken by img tag, you might like to use
visibility: hidden; instead of display: none;
as display: none; will simply mess your layout
where visibility: hidden; will reserve the space, it will just hide the img.
Enjoy Demo:
Hope this help !
Categories: ASP.NET
ie, img, src, src is empty
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Comments