I have 2 different div containers in my same jsp file for which i dont have access to edit.
--Div 1
<div class="mar-t40 alignRight">
<img id="ts_fclogoBox" alt="Logo" src="{{imgPath}}/content/dam/Logo.png" />
</div>
--Div 2
<div class="alignRight">
<img id="ts_fclogoBox" alt="Logo" src="{{imgPath}}/content/dam/Logo.png" />
</div>
Now i need to apply the below css only to ts_fclogoBox present inside DIV 2. Is it possible to achieve it without editing the jsp file ?
#ts_fclogoBox {
margin-left: -15px;
}
I feel that is impossible but just wanted to see whether is there some way.
Use class and ids to avoid confusion with other divs
div.alignRight:nth-child(2) img#ts_fclogoBox{
margin-left:-15px;
}
you can acheive that by using child selector in css3
div:nth-child(2) img {
margin-left: -15px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With