I'm trying to center adsense in my forum but it only wants to center in IE. not firefox. I'm using <div align="center"> I don't know what else to use to make it work for firefox too. Thanks
Better use this: <div style="text-align:center"> code here </div> Code (markup): usually it works on all browsers
Just tried it but it still didn't work. Thanks for the quick response I wonder if it matters that it's a .php file
Sounds strange, because even if it was a CSS issue, the above code should work. No PHP does not matter. The final HTML code is always processed by the browser, not the server. I am going to give you another code snipet that usually works. It is not actually centering, it puts some margin on the left of the text: <div style="margin-left:140px;"> text </div> Code (markup): See if it works. You may need to change 140 to another number to better position the code. It is always working for me. If it does not make any difference on your page it appears that you should change your CSS file.
<div class="center"> <!-- ADSENSE --> </div> Code (markup): .center { margin: 0 auto; text-align: center; } Code (markup):
Thanks. None of these codes budged it. The URL is http://www.musiciansplaza.com/index.php?topic=1.0 You can see the adsense just before the first post.
Try this: <table width="100%" align="center"> <td bgcolor="#EAFCB5" align="center" > Adsense </td> </table> Code (markup): Change the colour as per your forum.
Wow that worked perfectly. Not only did it center it but.. The adsense block was meant to be right under the first post. But It was showing before the first post. So I said I could deal with that. Your code made it show after the first post (like i originally wanted) Now I just gotta fix the color. Thanks