css selectors - How to hide element with css with specific title? -


i want hide input element. in fact have few of them , have use names.

<input type="image" alt="storage administration" src="app_themes/default/topmenu$store$png$ffffff$000000.iconhandler.axd" title="storage administration" id="ctl00_ctl00_topmenucph_btnadm" name="ctl00$ctl00$topmenucph$btnadm"> 

could suggest how use full title or alt?

[title ~= "storage"] {      display: none;  }  

that works but, doesn't work in firefox , chrome.

[title ~= "storage administration"] {      display: none;  } 

if cannot use full title, how can narrow selection if input element in inside .topmenu > div > li?

<ul class="topmenu">     <div id="ctl00_ctl00_topmenucph_pantab">         <li><input type="image" alt="storage administration" src="app_themes/default/topmenu$store$png$ffffff$000000.iconhandler.axd" title="storage administration" id="ctl00_ctl00_topmenucph_btnadm" name="ctl00$ctl00$topmenucph$btnadm"></li>         <li><input type="image" alt="envelope templates" src="app_themes/default/topmenu$envelope$png$ffffff$000000.iconhandler.axd" title="envelope templates" id="ctl00_ctl00_topmenucph_btnenv" name="ctl00$ctl00$topmenucph$btnenv"></li>         <li><input type="image" alt="my documents" src="app_themes/default/topmenu$mydocuments$png$ffffff$000000.iconhandler.axd" title="my documents" id="ctl00_ctl00_topmenucph_btnmyd" name="ctl00$ctl00$topmenucph$btnmyd"></li>     </div> </ul> 

the attribute selector using doesn't work way expecting work. when put [title~="storage administration"], css looking elements have title of either "storage" or "administration".css not match anything.

take @ attribute selector spec more thorough description:

http://www.w3.org/tr/css21/selector.html#attribute-selectors

if want look, specifically, elements "storage administration" title attribute, use [title="storage administration"]. note ~ (tilde) removed equation.

in css3, there additional attribute selectors, such *= substring match (see: spec on css3 selectors). other people trying similar things in this other stackoverflow answer.

here's example using logic. no idea if works you, play around these other options. sure check browser compatibility, i'm not sure support these yet.

[title^='storage'], [title*=' storage']{     display: none; } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -