سؤال

This webpage contains images inserted by Wordpress. The code used to insert the first image is:

[caption id="attachment_887" align="alignnone" width="604"]
    <a href="http://steven.doig.com.au/files/2013/06/Forest_Legacy_m.jpg">
        <img class="size-large wp-image-887" alt="a Forest Legacy group" src="http://steven.doig.com.au/files/2013/06/Forest_Legacy_m-1024x681.jpg" width="1024" height="681" />
    </a> a Forest Legacy group[/caption]

This image is controlled by CSS:

#content .wp-caption a img {
    width: 614px;
    height: auto;
}

I want to make this image responsive. I've inserted the CSS:

@media (max-width:988px) {
    #content .wp-caption a img {
        width: 99.03225806%; /* 614/620 */
        height: auto;
    }
}

However, the DIV.wp-caption remains at 604px, as specified inside the Wordpress post. I've tried specifying this as a percentage (97.41935483%) but Wordpress reinterpreted it as 104px.

The inline CSS is overriding the CSS I insert into the stylesheet.

<div id="attachment_887" class="wp-caption alignnone" style="width: 614px">

Any ideas on how I can make the .wp-caption responsive?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى wordpress.stackexchange
scroll top