0

I am trying to override the default img tag style when a category is set to a blog.

I have changed the html editor and tried numerous things inside the CMS but nothing lets me remove or change the added style attribute. This is how it comes out:

<img src="picture.jpg" alt="alt text" width="100" height="123" style=" float:left; margin: 3px; border: 1px solid #cccccc;"/>

I need to hack out the style part, just remove it all so I can use the style sheet to style it.

I have found this jquery method: changing the img src with jquery

    <script>
    $('.items-leading img').attr('style',function(i,e){
 return e.replace("float:left; margin: 3px; border: 1px solid #cccccc;","");
});

  </script> 

And added it to the top of the tag. But it doesn't work ;(

Please help !

Community
  • 1
  • 1
elliotrock
  • 3,410
  • 3
  • 22
  • 25

1 Answers1

1

if you want remove style of img tags, simply use this code:

<script type="text/javascript">
    $(function(){
            $('.items-leading img').css({});
    });
</script>
EmRa228
  • 1,226
  • 13
  • 22