How to set up twitter's embedded timeline width in percentage (responsive/fluid design)

后端 未结 9 1479
慢半拍i
慢半拍i 2021-02-04 17:06

I\'m looking to set up twitter\'s embedded timeline, it\'s quite easy when you\'re having a fixed design, but that\'s not my case and I\'m actually building a fluid and responsi

9条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 17:32

    This logic will work to change at least the width and height:

    #twitter-widget-0, #twitter-widget-1 {
      float: none; 
      width: 100% !important;  
      height: 250px !important;
    }
    

    The only problem with shortening the height is that it hides the text box for people to send tweets but it does shorten the height. My guess is that if you want to add other CSS styling you can just put the !important clause. I also assume that if you have three widgets you would define #twitter-widget-2, etc.

提交回复
热议问题