Web Design Forum HTML CSS JavaScript PHP Graphic Design SEO forum
Centering an image on a page - Printable Version

+- Web Design Forum HTML CSS JavaScript PHP Graphic Design SEO forum (http://www.webdesignforum.com.au)
+-- Forum: Web and Graphic Design (/forumdisplay.php?fid=1)
+--- Forum: Web design (/forumdisplay.php?fid=4)
+--- Thread: Centering an image on a page (/showthread.php?tid=559)



Centering an image on a page - perth - 10-31-2011 06:22 PM

I have a "splash screen" to my website, and I'm wanting it centered perfectly on the page. Centering it horizontally is obvious, with the <center> tag, but centering it vertically is ending up being quite a challenge to me.

Originally, I set a table with height=100% (making itself stretch to the size of the page), and that was that. However, "height" isn't technically a valid HTML attribute, and the problem is that I'm trying to keep my page within the XHTML standards (which pretty much means you can only use valid attributes).

So, is there any way of doing this with stylesheets or something? Any help would be appreciated.