Forum Moderators: not2easy
I can't get this div to center. Its a bit off.
So far Im using a div to center and another div that contains the other attributes so that it would expand vertically from top to bottom.
This is my Code :
<html>
<head>
<style type="text/css">
.maincontainer {
width:700px;
margin:0 auto;
text-align:center;
}.containerblack {
padding:100px;
background-color:black;
text-align:left;
float:left;
}
</style>
</head>
<body>
<div class="maincontainer">
<div class="containerblack">
</div>
</div>
</body>
</html>
If anyone knows what Im doing wrong I would really appreciate some help! - Rye
.containerblack {
padding:100px;
background-color:black;
text-align:left;
width: 15%;
margin:0 auto;
}
[edited by: Old_Honky at 11:13 am (utc) on April 25, 2008]