I adapted the widget to the width of the block in which it is located; but the fact is that when a large image is published in it (meaning that the widget is, for example, 500px wide, and the image is 800px) the image is cropped. In order for it to stand completely on the full size in the chat you need to refresh the page. This is how the picture looks after publication: enter image description here

And so the picture looks like after updating the site page: enter image description here

    1 answer 1

    No, even if you set the width: 'auto', then the size calculation will work only when the widget is loaded. You can of course rewrite styles individually for buttons, notes and pictures, but what’s the point?

    • And such a question. I added a comment widget, my site supports the mobile version, but the problem is that in the normal version, VK comments look normal, and with the mobile version, the width of the VK widget remains the same as it was originally at 698px. - Serge
    • wrote in styles - #vk_comments, #vk_comments iframe {width: 100%! important; } - Serge
    • but it didn’t help, the width of the mobile didn’t change anyway - Serge
    • one
      The width parameter of the widget just do not specify and it will be adaptive. No CSS is needed. - neluzhin
    • Here, an even better option was suggested) Until I came across a constant change in the widget elements. - Eduard Misk