twitter - Assigning Facebook like send div, tweet iframe, Google Plus dynamic width -


i using facebook send, tweet , google plus this. specifying width 320 facebook div , width 105 tweet. facebook , tweet button's (div/iframe) should automatically increased , decreased on own based on content width inside them. can suggest me way achieve this. main idea cut gap between these sections.

<script type="text/javascript">     var snimpl= "<%=snimpl%>";      if (snimpl == "true") {         (document, 'script', 'facebook-jssdk');         (function(d, s, id) {             var js, fjs = d.getelementsbytagname(s)[0];             if (d.getelementbyid(id)) return;             js = d.createelement(s); js.id = id;             js.src = "//connect.facebook.net/en_us/all.js#xfbml=1";             fjs.parentnode.insertbefore(js, fjs);         } (document, 'script', 'facebook-jssdk'));         (function() {             var scrgoogleplus = document.createelement('script');             scrgoogleplus.type = 'text/javascript';             scrgoogleplus.async = true;             scrgoogleplus.src = 'https://apis.google.com/js/plusone.js';             var scrwriter = document.getelementsbytagname('script')[0];             scrwriter.parentnode.insertbefore(scrgoogleplus, scrwriter);         })();     } 

    <div class="fb-like" data-href="<%=strsnurl %>" data-send="true"         data-width="320px" data-show-faces="false">     </div>     <iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/tweet_button.html?url=<%=strsnurl %>&via=someone&text=something" style="width: 105px; height: 25px;"></iframe>    <g:plusone href="<%=strsnurl %>"></g:plusone> 

you need know ahead of time how wide make plugins.

if specify 320px facebook, facebook's iframe become 320px. facebook doesn't know how minimum width iframe's contents take, follows orders of 320px. (http://developers.facebook.com/docs/reference/plugins/like/) suggest trying specify 120px , changing layout style "button_count" 1 narrow compared default "standard". "box_count" narrow choice of them all, taking 50px width.

for twitter (https://dev.twitter.com/docs/tweet-button), can specify "vertical" count property , skinny 58px wide.

for google (https://developers.google.com/+/plugins/+1button/), can specify tall bubble match other two. give width of 50px.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -