/ Published in: HTML
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css" media="screen">
html, body {padding: 0; margin: 0; border: 0; background: #00f;}
#container {
background: #fff;
margin: 0 150px;
border: 1px solid #f00;
padding: 5px;
text-align: center; /* IE 5.x center */
}
#container ul {
border: 1px solid #000;
display: -moz-inline-box; /* For FF<3 */
display: inline-block; /* IE <8 needs this tripped back to display: inline; to make it work on block elements - see conditional below */
vertical-align: middle; /* explicitly declare your preference as Moz inline-box auto aligns to top */
text-align: left; /* to left align text within divs when container has been set to center */
margin-left: auto; margin-right: auto; padding: 0px;
}
#container ul li {
padding-right: 10px;
border-right: 1px solid #ccc;
padding-left: 10px;
float: left;
}
</style>
<!--[if lt IE 8]>
<style type="text/css" media="screen">
ul {display: inline;} /* this is to make inline-block work on block elements versions <IE8 */
ul li {display: inline;}
</style>
<![endif]-->
</head>
<body>
<div id="container">
<ul>
</ul>
</div>
</body>
</html>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                