slugger
Banned
I am trying to align a picture right in the middle of the screen using HTML/CSS
Althought I am able to align it in the middle - either vertically or horizonatally but I am not able to do it both at the same time, ie no matter what the moitor size the picture must alway remain at the center of the screen
My code
Verticle Middle
Horizontal Middle
Although i can do it by making the image as a background, I want to make it a link so image as a background not an option
Althought I am able to align it in the middle - either vertically or horizonatally but I am not able to do it both at the same time, ie no matter what the moitor size the picture must alway remain at the center of the screen
My code
Verticle Middle
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN"
"*www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Verticle Alignment</title>
</head>
<body bgcolor=#000000>
<style> body,html { height:100%;margin:0; } </style>
<table border="0" height="100%">
<tr>
<td valign="middle">
<a href="*blogspot.com"><img src="center.gif"></a>
</td>
</tr>
</table>
</div>
</body>
</html>
Horizontal Middle
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN" "*www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Horizontal alignment</title>
</head>
<body bgcolor=#000000>
<center>
<table>
<tr>
<td align="center">
<a href="*blogspot.com"><img src="center.gif"></a>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
Although i can do it by making the image as a background, I want to make it a link so image as a background not an option