Ignore padding for images inside paragraph
This looks simple at first glance, but I couldn’t find a solution so far, after a lot of searching.
I want to have different padding for images and text inside a div.
The images are inserted in articles without uploader, from HTML, so they don’t have a class of their own such as float. WordPress sometimes puts that inside <p>paragraph</p>, other times it’s just the <img> without <p>.
I can give attributes to “.entry_class img”, but that will inherit the properties of the paragraph. That is, the image can have some extra padding than the text, but not less. And I need the image to be exactly the size of the div, while the text still hass some nice padding around.
I’ve tried overriding the div properties with “!important” for “img” but with no success. There must be a solution to style images inside the loop.
- The topic ‘Ignore padding for images inside paragraph’ is closed to new replies.