I'm working on a project that has 2 different CSS, one light and one dark. And a few images are inside the <img> tag, and I need to change their colors, only using css, since I'M NOT ALLOWED TO CHANGE HTML OR JAVASCRIPT
So, I thought on using their ID to overlap them. I actually got the image to be on the same place, however, behind the original image.
Any ideas?
The HTML
<div id="div-icones" style="width: 164px;">
<ul id="ulIcones" class="icones">
<li>
<a href="#" class="" title="Trocar para a versão simplificada" onclick="ChangeVersionHB('min');">
<img title="Trocar para a versão simplificada" id="imgChangeVersion" src="images/ico_hb_min.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Salvar Configuração" onclick="saveCfg();">
<img title="Salvar Configuração" id="imgSave" src="images/ico_sv.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Restaurar Configuração Padrão" onclick="resetCfgDefault();">
<img title="Restaurar Configuração Padrão" id="imgConfDefault" src="images/folder_image.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Bloquear funções de Layout" onclick="oSTBroker.fixLayout();">
<img title="Bloquear funções de Layout" id="imgCadeado" src="images/lock_open.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Configuração do Cliente" onclick="showCfgCli();">
<img title="Configuração do Cliente" id="imgCliCfg" src="images/ico_cg.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Teclas de Atalho" onclick="showHotkeys();">
<img title="Teclas de Atalho" id="imgHotkeys" src="images/ico_hk.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Manual" onclick="AbrePagina(ConfigHB.urlManual, 'WINmn', '', 'no', 'yes', '780', '560', false);">
<img title="Manual" id="imgAjuda" src="images/ico_aj.png" width="16" height="16">
</a>
</li>
<li>
<a href="#" class="" title="Seleciona CSS" onclick="AbrePagina('LstEstilos.aspx', 'LstEstilos', '', 'no', 'yes', '780', '300', false);">
<img title="Selecione o layout" id="imgSelCss" src="images/ico_ml.png" width="16" height="16">
</a>
</li>
</ul>
My CSS to change the image
#imgChangeVersion {
box-sizing: border-box;
background: url(images/ico_hb_minc.png);
background-size: 16px;
}
a[title="Seleciona CSS"]anda[title="Seleciona CSS"] imgas selectors.