PDA

View Full Version : help with image centering


oljam88
10-03-2010, 03:12 PM
i wanna have an image on the center of the first page of my website, but for some reason i can;t center it!
i want it to be on the center regardless the size of the window.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-image: url(../za%20sajt/pozadinabela.jpg);
background-repeat: repeat;
}
-->
</style></head>

<body>
<div align="center"><img src="../za sajt/watercolor copy.gif" width="428" height="334" align="absmiddle" /></div>
</body>

</html>




it's centered bit it;s always on top of the page.

gentleone
10-03-2010, 07:47 PM
this article explains:
http://community.contractwebdevelopment.com/css-vertically-horizontally-center

If you get stuck then let me know.