LudoScience

How to customize Twitter widgetDamien Djaouti | 01-17-2012 | 18:53

Among the numerous functionalities featured on Twitter, one of coolest is the ability to display our own tweets on your blog. A very nice official widget can be used to do this, as we are doing on this blog.

 

However, customization options offered by this widget are quite limited. For example, it is not possible to modify the size of the text used to display tweets. After spending a long time seeking for a solution to this problem, I'd like to share the most efficient one I found: the modification of some CSS classes related to the widget.

 

While the official documentation doesn't tell about it, you can customize the display of the widget by modifying the CSS class ".twtr-tweet-text". For example, if you add this code to your CSS stylesheet, you'll reduce the text size inside the widget:

 

.twtr-tweet-text {
font-size: 0.9em;
}

 

In a similar way, you can hide the huge logotitle with the following style:

 

.twtr-hd {
display: none;
}

 

Last but not least, as you are going to display your own tweets on your own blog, you certainly don't need to display your twitter username before each tweet. The following style will hide the username for you:

 

.twtr-user {
display: none;
}

 

Here is for a few twitter widget customisation tricks. And by-the-way, if someone finds a way to hide the hashtags inside the widget, I'll be very happy to hear the solution...


Category : Misc., | Keywords : twitter, widget, customization,
Ludoscience is a scientific research laboratory dedicated to videogames

About


This website gathers ours thoughts, our projects, our publications and many pedagogical resources related to the various types of videogames:

Blog categories



Our books


Buy our book 'Learning with Serious Games' (in french)

Buy our book 'PlayStation VS Saturn : war of the 32 bits' (in french)

Buy our book 'Serious Games: an introduction' (bilingual edition: english and french)

Buy our book 'Introduction to Serious Games' (in french)

Follow us



Our last tweets

Videogaming links