Forum Moderators: not2easy
<body>
<div id="holder">
<ul>
<li>
<div id="item">
</div>
</li>
<li>
<div id="item">
</div>
</li>
<li>
<div id="item">
</div>
</li>
</ul>
</div>
</body>
//////////////////End Code/////////////////////////////////////
And here is my CSS code
////////////////////////CSS CODE///////////////////////////////
ul{
}
ul li{
list-style-type: none;
display: inline;
border: solid #ff0000 1px;
}
#item{
height: 125px;
width: 100px;
display: inline;
margin-left: 25px;
margin-right: 25px;
margin-bottom: 0;
margin-top: 0;
border: solid #ffffff 1px;
background-color: #00ffff;
}
#holder{
text-align: center;
}
1. An ID is what it says: identification. You can only have one per page. If you are going to have many, use a class.
2. IE will allow an inline element to have a forced width; in standards-compliance, an inline element is inline--how can it have a width?
There are a couple of ways to do this, but in order to it's best to get more information: what kind of content are you putting into these four centered columns?
Is each column completely unrelated to another?
//////////////////////////CODE////////////////////////////////////////
<html>
<head>
<style type="text/css">
div.holder{
text-align: center;
width: 240px;
margin-left: auto;
margin-right: auto;
}
div.Item{
float: left;
/*display: inline;*/
margin: 10px;
width: 100px;
}
div.Bottom{
/*display:inline;*/
}
div.Top{
/*display: inline;*/
}
div.Center_for_IE{
text-align: center;
}
</style>
</head>
<body>
<div class="Center_for_IE">
<div class="Holder">
<div class="Item">
<div class ="Top">TOP1</div>
<div class ="Bottom">BOTTOM1</div>
</div>
<div class ="Item">
<div class ="Top">TOP2</div>
<div class ="Bottom">BOTTOM2</div>
</div>
</div>
</div>
</body>
</html>