Monday , February 3 2025

How to change the width for Vk and Facebook widgets from pixels to percentages

Very often I need to replace a narrow widget, which for some reason is assigned to VKontakte with a fixed width of 300px, with a percentage, for example 100% – in order to be displayed on the entire width of the side column.

The solution is simple, make changes to the css file of the site.

Replace px with % for Facebook comments widget

.fb-comments,.fb-comments span,.fb-comments iframe {width: 100% !important;}

Replace px with % for Vkontakte comments widget

#vk_comments,#vk_comments iframe {width: 100% !important;}

About iryna

I'm Iryna, a web developer from Ukraine with a decade of experience solving complex technical challenges in the world of freelance. Throughout my career, I've worked on everything from troubleshooting server-side issues and optimizing website performance to enhancing user interfaces. On this blog, I share detailed solutions to the technical problems I’ve encountered and methods that have worked best for me. In addition to my technical expertise, I’m also passionate about digital drawing. I hope the tutorials and insights I provide here will help both fellow developers and creatives alike in their own projects.

Check Also

How to disable top panel (Toolbar) on the WordPress frontpage

The solution is so easy to follow. There is no need to edit CSS or …

Leave a Reply

Your email address will not be published. Required fields are marked *