PDA

View Full Version : HTML Home Page Image Justification Question


nathanc78
May-17-2009, 12:12 PM
Hi,

I have the following code in the Bio field on my home page:

<html>
<table cellspacing="1">

<tr align="center">
<td rowspan="1" width="70%">
<img src=http://www.smugmug.com/photos/519340027_6XDmx-L-0.jpg>
</td>


</table>
</html>

I just adjusted the size of my image and now it is not centered. I trying adjusting the cellspacing and rowspan/width but nothing seemed to center it properly. Is there something else I can do?

jfriend
May-17-2009, 01:12 PM
Hi,

I have the following code in the Bio field on my home page:

<html>
<table cellspacing="1">

<tr align="center">
<td rowspan="1" width="70%">
<img src=http://www.smugmug.com/photos/519340027_6XDmx-L-0.jpg>
</td>


</table>
</html>

I just adjusted the size of my image and now it is not centered. I trying adjusting the cellspacing and rowspan/width but nothing seemed to center it properly. Is there something else I can do?

Your image is larger than the container that it's in, therefore it can't center. To make the container larger, add this CSS:

#homepage {width:820px;}

As best I can tell, you don't any of that table stuff in the bio. If you just put this in the bio, it will all work and be simpler:

<html>
<img src="http://www.smugmug.com/photos/519340027_6XDmx-L-0.jpg" border="0">
</html>

nathanc78
May-17-2009, 01:32 PM
That worked great! Thank you.


Your image is larger than the container that it's in, therefore it can't center. To make the container larger, add this CSS:

#homepage {width:820px;}

As best I can tell, you don't any of that table stuff in the bio. If you just put this in the bio, it will all work and be simpler:

<html>
<img src="http://www.smugmug.com/photos/519340027_6XDmx-L-0.jpg" border="0">
</html>