- Messages
- 2,097
- Edit My Images
- No
Hey all,
Can someone test the following CSS so I can verify that it works correctly please? The aim is to have centered content on any given page size by automatically aligning the div tag both vertically and horizontally. It works on Firefox (Linux) so if you could spare the time and test it on your machine it would be much appreciated as I don't have a live domain to test it on.
Here's the HTML so you can just copy and paste:
Thanks,
KB.
Can someone test the following CSS so I can verify that it works correctly please? The aim is to have centered content on any given page size by automatically aligning the div tag both vertically and horizontally. It works on Firefox (Linux) so if you could spare the time and test it on your machine it would be much appreciated as I don't have a live domain to test it on.
html, body {
height:100%;
}
#centeredcontent {
width:400px;
height:50px;
text-align:center;
color:#CCC;
position:absolute;
left:50%;
top:50%;
margin-left:-200px;
margin-top:-25px;
}
Here's the HTML so you can just copy and paste:
<html>
<head>
<title>V / H Align</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel=StyleSheet href="css.css" type="text/css">
</head>
<body>
<div id="centeredcontent">Coming Soon!</div>
</body>
</html>
Thanks,
KB.