PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Sep 30, 2020 3:24 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Twitter Width problems
PostPosted: Thu Apr 09, 2015 4:14 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Hi

We have a Twitter feed on various homepages. They are normally set to either 100% wide, that stretches to fit a narrow mobile, or 350px wide.

But now we want our feeds to be 100% width of our desktop screens. Facebook is easy. Blog is easy. But Twitter seems to force it to be 520px max.

I've seen various methods of CSS to overcome this. But none work.
These are two options.
Syntax: [ Download ] [ Hide ]
      width: 100% !important;
    }
   
#twitter-widget-0 {
     width: 950px;
    }


Reading the Twitter help pages, it seems it cannot be done as the max is 520 (goodness knows why).

So is the definitive answer that they have oddly stopped it goes wider? OR can it actually be done?

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Thu Apr 09, 2015 7:24 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
You're asking us to help you style invisible markup.

_________________


Top
 Profile  
 
PostPosted: Thu Apr 09, 2015 7:35 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
It's just the Widget code:

Syntax: [ Download ] [ Hide ]
  <a class=\"twitter-timeline\"  href=\"https://twitter.com/---\" data-widget-id=\"---\"  height=\"200\">Tweets by @---</a>
            <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>


So if I put in width=\"100%\" it doesn't work.
And the CSS I posted doesn't do it.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group