SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Twitter Timeline Issue - Padding and Background

    Hi all

    When I add data-chrome="transparent" to the embedded twitter timeline the padding then disappears. Its a known issue at the moment amongst the forums though can't seem to find a solution.

    If data-chrome="transparent" is removed everything works, though you're then limited with twitters Dark/Light colors, meaning you can't add your own background-color to match your site.

    This is what's causing the issue:
    Code CSS:
    .var-chromeless .tweet {
    padding: 12px 2px 10px 58px;}
    which overrides

    Code CSS:
    .tweet {
    padding: 12px 12px 10px 69px;}

    Anybody having the same problem? Know of a fix?

    Thanks, CB
    The more you learn.... the more you learn there is more to learn.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,293
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Can you just wrap it in another element—like a div—with padding?

  3. #3
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph

    Everything is wrapped up in an iframe, this is the problem, I can't change the padding manually. I already have a div wrapped around the transparent timeline, this is how I get my desired background-color.

    I have found a temp solution though doesn't work well on mobile and was hoping not to use javascript for something so trivial.

    Code JavaScript:
    window.setTimeout(function(){
            $(".twitter-timeline").contents().find(".tweet").css("padding","12px 12px 10px 69px");
          }, 1000);

    Is there a workaround?

    Thanks, CB
    The more you learn.... the more you learn there is more to learn.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,293
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Given the online discussions about this, it seems there isn't a proper solution yet.

  5. #5
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes ralph, you've probably been reading the same posts, that's the reason I'm here to see if anybody knows of a work around.

    Thanks, CB
    The more you learn.... the more you learn there is more to learn.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •