Posts: 158
Name: cbeaudin
Location: Proud to be Canadian
|
I'm not sure exactly what you are trying to center, i assumed div.gradient.
Code:
<!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>CSS Cross Browser Gradient Box</title>
<style type="text/css">
body {
text-align: center;
text-valign: center;
margin-top: 0.25%;
margin-bottom: 0.25%;
margin-left: .65%;
margin-right: 0.25%;
padding: 0px;
background-color: #b2d2e3;
}
.gradient {
/* NEW SECTION */
width: 1010px;
height: 555px;
border-style: solid;
border-width: 1px;
margin: 0px auto;
/* END OF NEW SECTION */
background: #c5deea; /* old browsers */
background: -moz-linear-gradient(top, #c5deea 0%, #8abbd7 31%, #066dab 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c5deea), color-stop(31%,#8abbd7), color-stop(100%,#066dab)); /* webkit */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c5deea', endColorstr='#066dab',GradientType=0 ); /* ie */
</style>
<style type="text/css">
#container {
float:left;
width: 100%;
height: 100%;
}
#cs1 {
float:left;
color: red;
height:3%;
background:white;
border-style: solid;
border-width: 1px;
padding: 5px;
margin-left: 28%;
}
#cs2 {
float:left;
color: red;
height:2%;
background:white;
border-style: solid;
border-width: 1px;
padding: 5px;
margin-left: 28%;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
}
#botcol {
float:right;
width:20%;
height:1.5%;
background:white;
border-style: solid;
border-width: 1px;
padding: 5px;
margin-left: 5px;
margin-right: 5px;
}
</style>
</head>
<body>
<div class="gradient">
<div align="center">
<div id="container"></div>
<p />
<div id="cs1" align="center"> Coming Soon...A Brand New Trend In Website Advertising!</div>
<p />
<br />
<br />
<div align="center">Choose your <b><i><u>preferred</b></i></u> browsing resolution: <b>Default</b>: <a href="#">1024x768</a>
<p />
<a href="#">1280 x 600</a> | <a href="#">1280 x 720</a> | <a href="#">1280 x 768</a> | <a href="#">1280 x 800</></a> | <a href="#">1280 x 1024</a> | <a href="#">1366 x 768</a>
<div align="center">This page is <b><u><i>Best Viewed</b></i></u> at 1024 x 768 Resolution!</div>
<div align="center"><img src="images/logo.png" alt="Reunite My Site Logo" title="Reunite My Site Logo"></div>
<p />
<div id="cs2" align="center"> Website is currently under construction, please be patient!</div>
<p />
<br />
<br />
<div id="botcol" align="center" valign="bottom">Reunite My Site © 2011</div>
</div>
</body>
</html>
__________________
- cbeaudin
Last edited by cbeaudin; 03-04-2011 at 06:25 AM..
|