I need to remove the CSS styling from an image, but I can't modify the generated code where it's coming from. My actual code looks like this:
<div class="bubble">
<img id="one" src="/static/webupload/MyronArtifacts/images/descarga.png" style='float: left;' alt="Quotes">
<p id="comment11">I was very impressed with the unique design and high quality of this pen.
</p>
</div>
<div class="quote_speech">
<div class="name" id="author11">By PEDE</div>
<div class="company" id="company11">September 25,2013</div>
</div>
This code is inserted into a div named rightCol in the generated code.
There is a CSS class defined as follows:
#rightCol img{
display:block;
float:none;
margin:0 auto 0 auto;
position:relative;
border:0;
padding:3.5px 0;
backgroun-color:#fff;
width:166px
}
The issue lies with the width:166px property. Unfortunately, I cannot manually remove it due to constraints with the generated code.
I thought of using JavaScript for this task by checking if the image has a specific class like so: $('#one').hasClass('img')
However, this check returns false. I created a demo in JSFIDDLE to showcase this behavior. You can view the demo here.
If I remove the 166px width property from the CSS, it solves the issue. But that's not an option for me. Any insights on why the hasClass method isn't working?
Thank you in advance