I would like to center my images and my Google ad in my index_body.tpl file. At the moment the code looks like this : What would be best to do, divide it up in two different tables or?
you just want to center them in the table? If so just use <td align="center"> *edit* oh if you want to center all your image td's you can do something like this: <tr> <td align="center" colspan="4"> <table><tr> <td width="182"><img src="http://www.domain.nl/forum/images/n770_cs.jpg"></td> <td width="182"><img src="http://www.domain.nl/forum/images/n70_pm_cs.jpg"></td> <td width="182"><img src="http://www.domain.nl/forum/images/n90_pm_cs.jpg"></td> <td width="182"><img src="http://www.domain.nl/forum/images/n91_pm_cs.jpg"></td> </tr></table> </td> </tr> <tr>
yup same thing just do: <td colspan="4" align="center"> <script type="text/javascript"><!-- google_ad_client = "google id"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text"; google_color_border = "F4F6FB"; google_color_bg = "F4F6FB"; google_color_link = "000066"; google_color_url = "000000"; google_color_text = "222222"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </td>
I've tried it and it works, if you want to center each image in its respective TD you can use the following code (If you are looking to center the whole table on the page just use <center></center> around the entire table):
Thanks for the responses. Still cant get it to work. I will let someone look at it. Maybe there is already a table in there that might cause the problem. BTW im using phpbb not sure if that is of any difference?
I've never used phpbb, but I do not see why that would make a difference as long as there is no broken code on the page. If you want to send me the page I can take a look at it for you.