I have a simple Under Construction Page and want to align my under construction image to the middle of the screen. Horizontally it is no problem but vertically I cant even position the image.
Here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Page Under Construction</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<style type="text/css">
body {
background-color:#d7df29;
width: 100%;
height: 100%;
}
.img {
text-align: center;
margin: 0 auto
vertical-align: middle;
top:500;
}
#html5 {
position:absolute;
top:0;
right:0;
}
</style>
</head>
<body>
<div class="img"><img src="1.jpg" alt="Under Construction"></div>
<div id="html5"><img src="images/img_html5_FR.png" height="120" width="120" alt="" /> </div>
<img src="images/fb2.png" style="position: fixed; top: 350px; left: 0px;" title="Bierzyk na Facebook'u" alt="Bierzyk na Facebook'u">
</body>
</html>
If you make your
.imghave a height of 100%, you can set the image to be abackground-imageof that div (or of thebody) and then vertically align it that way. This should work as your other elements on the page are positioned absolutely and fixed