• Hi, i am attempting to resize a this image but it’s not working. I later learned the sizes of width and height comes from the video image.

    I would wish to have css where i can reduce the size of this image. I have attempted the below css with no success:

    .perfmatters-lazy-youtube img{height:315px!important}

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator bcworkz

    (@bcworkz)

    There does not appear to be a “perfmatters-lazy-youtube” class, hence your CSS will not be applied.

    You already have a rule setting the width of the image in additional CSS:

    div.text img {
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: 370px;
    }

    It is applied to all images in a div.text. You could alter this rule to affect all such images. If you wish to only affect this one image it should have a more specific class or ID attribute you can use as a selector.

    Reduce its size? It’s already only 208px high. Making it 315px high would increase its size.

    Thread Starter salave

    (@salave)

    Hi, the trouble i am having is the embedded YT videos are reported to have gone outside the viewpoint. I attempted to add this to my theme function:

    add_filter( 'embed_defaults', 'change_embed_size' );
    
    function change_embed_size() {
        // Adjust values
        return array('width' => 400, 'height' => 280);
    }

    plus i added additional css

    img{
    width: 100%;}
    iframe{
    width: 100%;}
    

    but still its not working, the same problem is reported by Google. What can i do? Last page report screenshot.

    Moderator bcworkz

    (@bcworkz)

    Your page layout looks different from yesterday? I think you’ve resolved whatever the problem was. The YT embed is now within a mobile viewport.

    If you are still seeing it outside, perhaps you need to flush your browser’s cache.

    Thread Starter salave

    (@salave)

    Hello bcworkz, we tried to publish a new article today on Sunday and we received the same message, outside the viewpoint. If you check the screenshot, the section of thumbnail is not from youtube. Could be a hint?

    Moderator bcworkz

    (@bcworkz)

    I don’t think the thumbnail URL is at all related. Other than the image is on the same page, it doesn’t really make much sense why it’s listed. Anyway the complaint is specifically about the video itself.

    AFAICT the video looks to be contained within the viewport. Sometimes Googlebot is unable to access necessary supporting files such as important CSS files affecting layout. In Search Console, get to where you can view the crawled version of the problem page. Look at the More Info tab and expand the Page Resources item. If Googlebot failed to get any CSS or YouTube files, that could cause Google to misinterpret the layout.

    Thread Starter salave

    (@salave)

    Hi bcworkz,

    Recent past days a different picture has been developing. We normally receive the same issue as described on these pages: issue 1, and issue2 that normally generates a different outlook of the pages and posts.

    Muchly speaks turning off the cloudflare security, on which for me i remember also without using cloudflare before and i had faced similar problem, so it be the GDPR effects on REST API. How can we solve this?

    Moderator bcworkz

    (@bcworkz)

    If your GDPR plugin is interfering with API responses I suggest seeking advice through the plugin’s dedicated support channel.

    Something has developed on my end as well. I now have a similar “outside of viewport” message for one of my sites. I cannot figure out how Googlebot thinks my video is outside of the viewport. In my case it’s for a very old page and ensuring proper search ranking is not a priority. I intend to investigate further, but it’s not a top priority for me. If I discover anything useful I’ll let you know.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Resizing inner div’ is closed to new replies.