MyBB Community Forums

Full Version: Need to center this thing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Alright, sorry if it sounds like a noobish cry for help, but I've tried everything I know to do with this.

Anyway, I'm trying to center my Project Wonderful ads in my showthread (editing the postbit template, using MyAdvertisements) and I can't get the darn thing to center.
I've tried span, center, and div, but it still won't center Sad

Any help?
Alright, since it is in table, you will have to find this:

<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff">

Replace it with:
<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">

If you can't find that table then edit the Ads by Project Wonderful file and you can find it there. Then from there, just put the align center for the table and that automatically makes it set to center Smile
(2011-05-30, 01:57 AM)XxSky DreamerxX Wrote: [ -> ]Alright, since it is in table, you will have to find this:

<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff">

Replace it with:
<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">

If you can't find that table then edit the Ads by Project Wonderful file and you can find it there. Then from there, just put the align center for the table and that automatically makes it set to center Smile

I can't edit the PW code in any way, it's a script loaded off-site.
(2011-05-30, 02:27 AM)lucasbytegenius Wrote: [ -> ]
(2011-05-30, 01:57 AM)XxSky DreamerxX Wrote: [ -> ]Alright, since it is in table, you will have to find this:

<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff">

Replace it with:
<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">

If you can't find that table then edit the Ads by Project Wonderful file and you can find it there. Then from there, just put the align center for the table and that automatically makes it set to center Smile

I can't edit the PW code in any way, it's a script loaded off-site.

Okay then do you mind posting the code that you can see for this ads. he one that you tried to edit from the template so I can take a look at it.
(2011-05-30, 09:08 AM)XxSky DreamerxX Wrote: [ -> ]
(2011-05-30, 02:27 AM)lucasbytegenius Wrote: [ -> ]
(2011-05-30, 01:57 AM)XxSky DreamerxX Wrote: [ -> ]Alright, since it is in table, you will have to find this:

<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff">

Replace it with:
<table width="702" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff" align="center">

If you can't find that table then edit the Ads by Project Wonderful file and you can find it there. Then from there, just put the align center for the table and that automatically makes it set to center Smile

I can't edit the PW code in any way, it's a script loaded off-site.

Okay then do you mind posting the code that you can see for this ads. he one that you tried to edit from the template so I can take a look at it.

There's nothing to see in there. It's one line surrounded by <script> tags.

I need to use HTML to center the ad block in the showthread after a post, I don't want it aligned to the left and spilling out of the div box like it is.
Did you tried:
<div style="text-align:center;">SOMETHING</div>

If not worked then this:
<div style="text-align:center !important;">SOMETHING</div>
(2011-05-30, 04:47 PM)Sama34 Wrote: [ -> ]Did you tried:
<div style="text-align:center;">SOMETHING</div>

If not worked then this:
<div style="text-align:center !important;">SOMETHING</div>

Neither of them worked Sad

EDIT: Ok, using the center tags worked in Opera and Firefox.
CHROME I HATE YOU!!!! /sorry

How can I get this to work in Chrome?
Do you mean my code worked?

For chrome try this:
<div style="text-align:center;" align="center"><div style="text-align:left;margin-right:auto;margin-left:auto;">SOMETHING</div></div>
(2011-05-30, 05:29 PM)Sama34 Wrote: [ -> ]Do you mean my code worked?

For chrome try this:
<div style="text-align:center;" align="center"><div style="text-align:left;margin-right:auto;margin-left:auto;">SOMETHING</div></div>

I was talking about the <center> tags.

That didn't work either Sad
oops, my bad >_>

I have never used the center tag before (that I remember..) as it is deprecated, maybe that is the reason why it didn't worked on google chrome.

Try this code:
<div style="text-align: center;margin: 0px;padding: 0px:"><div style="margin: 0px auto;width: 500px;">SOMETHING</div></div>
Pages: 1 2 3 4