I am wondering how to prevent WordPress from applying in-line styles to image enclosing div's in posts.
<div class="img size-medium wp-image-3267 alignright" style="width:190px;">
Edit: The post is generated in the theme file by using the_content()
.
That width declaration is causing my post to display a horizontal scrollbar under the content. The weird thing is, the horizontal scroll bar only appears if the image is set to align right. Aligning the image to the left doesn't cause the scroll bars to appear.
I am able to remove the scrollbar by setting the .post overflow from 'auto' to 'hidden'.
Does anyone know how WordPress applyies the inline style? Or how to override it? For now, I've set .post overflow to be hidden, but I'm worried that down the line, that might bite me.
Thanks
the_content();
.<div>
elements like this by default ... so either your theme or a plug-in is adding the element wrapper ...