Friday , December 20 2024

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 admin

Hi there! My name is Iryna, I am a web developer from Ukraine. While working on freelance projects I often face different technical issues and in this blog I publish articles on how to solve them. I am also interested in digital drawing and in this blog you will find brief tutorials that helped me and hopefully can help you as well.

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 *