This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I center the Twitter Widget?
11-09-2012, 10:46 PM
Post: #1
How do I center the Twitter Widget?
Hey guys!

So I simply need to center this Twitter Widget, and everything I try seems to not work. Do you think you can help me out? Here's the code for the Twitter Widget:

<script src="http://widgets.twimg.com/j/2/widget.js"></script> <script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 30,
interval: 6000,
width: 250,
height: 300,
theme: {
shell: {
background: '#46a0d4',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#000000',
links: '#46a0d4'
}
},
features: {
scrollbar: true,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('THON').start();
</script>

And I've tried things such as <center> and </center> at the beginning and end of the code, as well as <div style="text-align: center;"> and </div> and the respective beginning and ends of the code (both not resulting in a centered Twitter Widget........).

If you guys can help that would be fantastic!! Thanks guys!

Ads

Find all posts by this user
Quote this message in a reply
11-09-2012, 10:54 PM
Post: #2
 
Add this to the Widget's container CSS:

margin: 0 auto;

Must have a width set less than 100% to center.

Ron

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)