New theme – images don't respect column boundaries
-
Just coding a new theme, and the images in the posts don’t seem to respect the widths of the column. The images are all already set with:
img { max-width:100%; height:auto; display:inline; }
in the style.css. I tried applying this to the column itself as well, but no change.
The images do respect column widths (resize to 100% width) when using other themes.
I notice that each image has a div around it, though, like this:
<div id="attachment_12315" style="width: 500px" class="wp-caption aligncenter">
Because each of these divs for each image has a different #id, I don’t know how to code them all to 100% width max.
Here’s a screenshot of the image not respecting the column width:
<script async src=”//s.imgur.com/min/embed.js” charset=”utf-8″></script>
Any ideas what’s going on here?
Thanks
JM
- The topic ‘New theme – images don't respect column boundaries’ is closed to new replies.