kylef
Gone
+1,352|6956|N. Ireland
I have this image that I want to be in the middle of the page, for all screen resolutions. I know that the <center></center> tags can center an image horizontally, but what about vertically? Any help would be greatly appreciated - here's a diagram to understand what I mean:

https://i159.photobucket.com/albums/t143/leetkyle/htlphelp.png

Thanks
OrangeHound
Busy doing highfalutin adminy stuff ...
+1,335|7112|Washington DC

Use a table and orient your vertical and horizontal settings to center and middle.

(I think that will work.)


Edit:  Yes it does:

Code:

<table height="100%"  width="100%">
    <tr>
      <td width="100%"  height="100%" valign="middle"  align="center">test</td>
    </tr>
</table>
Nessie09
I "fix" things
+107|7133|The Netherlands
If it's just an image, and nothing else:

Code:

<style>
html,body {
background: url('/imageurl.gif') center center no-repeat;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
same as trackr.net page
kylef
Gone
+1,352|6956|N. Ireland
Thanks - I'll give this a go later!

Board footer

Privacy Policy - © 2025 Jeff Minard