twitter widget wont center?

  • 1
  • Question
  • Updated 5 years ago
  • Answered
I'm trying to put a twitter widget on my page but when i edit the HTML with the usual "center" tags, the widget doesnt move. Any suggestions or workarounds?

Thanks

Chris
Photo of Chris Loughrey

Chris Loughrey

  • 11 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of John McCarthy

John McCarthy

  • 1292 Posts
  • 99 Reply Likes
Hi Chris,

Can you tell us which twitter widget you are using.
I'm guessing its from the twitter website?

John McCarthy
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
Hey Chris - sorry we didn't get to you earlier. You can also post your site's URL if you would like us to take a look. We'd need to know which page of your site the Twitter badge has been added to.
Photo of Callum

Callum

  • 357 Posts
  • 32 Reply Likes
Try wrapping you're HTML with <!-- <div align="center"> and </div> -->
(Ignore <!-- -->, theyre to stop GS interpreting it!)
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Chris

Please try adding this code. It will go above your twitter code:

<!--<style>
.twtr-widget {
text-align: center;
}
.twtr-doc {
text-align: left;
margin: auto;
}
</style>-->

As Callum mentioned above, please do not include the <!-- and -->
Photo of randall.shore

randall.shore

  • 1 Post
  • 0 Reply Likes
Everytime I try this, the <!--<style> and </style>--> tags disappear and it then leaves <!-- and --> appearing on the page. I am not copying that code into the page with the <!-- or the --> . Should the --> come after the twitter code?
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi Randall,
Make sure to leave out the <!-- and -->, these are added there so the code will show on the page here and not become active. Just start with the style tag and end with the closing style tag. Let us know how this goes.
Photo of Lauren I. Ruiz

Lauren I. Ruiz

  • 1 Post
  • 0 Reply Likes
This helped a lot! Thanks.

Lauren I. Ruz
http://www.pure-text.net
Photo of Nialler's X←

Nialler's X←

  • 2 Posts
  • 0 Reply Likes
but it didnt work for me :(
Photo of Nialler's X←

Nialler's X←

  • 2 Posts
  • 0 Reply Likes
yesss it worked!!!!tanxxx
Photo of Chris Loughrey

Chris Loughrey

  • 11 Posts
  • 0 Reply Likes
Thanks guys, worked perfectly. Thanks for your help!
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
That is great news Chris! Happy to hear that Callum and Sanja's suggestions worked for you :)