Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Linkedin Company Profile plugin Width

I have been trying to figure out how to change the size of the Linkedin Company Profile width which we can create here. They will give you two script tag which will create the widget for you in your site. Nothing else. So you have no control over your css.

I had been struggling for days and finally figured it out. I tried to add inline styling on the site even with the !important tag but it still took the styles from the linkedin.css. I tried styling it every possible way but didn't work.

Since SO allows to share knowledge as Q&A format I thought of sharing this. Please see the answer below.

like image 995
Techie Avatar asked Feb 14 '13 05:02

Techie


1 Answers

Here's an example of how to provide the width to a plugin:

<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/MemberProfile" data-id="http://www.linkedin.com/in/xxx" data-format="inline" data-width="400"></script>

You can add a data-width="400" attribute to the script tag. That's all.

like image 147
Techie Avatar answered Nov 06 '22 07:11

Techie