Hide specific image which have same class of other using only CSS -


i have page contain 2 icons , need hide 1 of them. problem both image have same class can't use .color_box {display:none;} because in case, both image hidden. difference between these 2 images own title tag, wondering if possible this. here example of code:

<img title="annotation" class="color_box" src="http://www.site.com/images1.png">  <img title="reservation" class="color_box" src="http://www.site.com/images2.png"> 

precision:

  • i don't have access html of related page
  • i'm allowed use css modifying global stylesheet file
  • the use of javascript not possible

any suggestion ?

you can use attribute selectors. work way ie7.

img[title="annotation"], img[src$="images2.png"] { display: none } 

as @jon noted, dependent upon html, if changes, you're kind of screwed. included src attribute illustrate it's possibility well.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -