PDA

View Full Version : Banner centered but showing up wrong.


obscura1560
07-20-2007, 06:06 PM
<a href="http://www.uk-mma.co.uk" target="_blank">http://www.uk-mma.co.uk</a>

I have centered the image successfully, but on my screen (1280x1024), it shows up off center. However, if I change the size of the window down to 960 width, it shows up fine. Is there anyway I can keep the image centered no matter what?

hinch
07-20-2007, 06:17 PM
<table border="0" width="960" cellpadding="0" cellspacing="0" align="center">
<tr>
<td><div style="margin: 0 auto;" align="center"><a href="index.php"><img src="/ukmmabanner.jpg" border="0" alt="UK-MMA" /></a></div></td>

</tr>
</table>

assume you mean you want the image slap bang in the centre? you can do it using a table as above or you could completely do away with the table and use a div


<div style="margin: 0 auto;background-color: #ffffff;width:960px;" align="center"><a href="index.php"><img src="/ukmmabanner.jpg" border="0" alt="UK-MMA" /></a></div>

obscura1560
07-20-2007, 06:21 PM
Okay that works, great! But one more problem, there's now a gap between the header and the forum

Edit: Okay simple answer, there was an &nbsp; tag that separated it, it works fine now.

Thanks a lot man