uniquelyyours
05-26-2005, 02:04 PM
Hello All,
I have a two column layout that I want to be centered, below is what I have can anyone tell me what is needed so that it shows center and not to the left as it is now thanks
<style type="text/css">
#container
{
width: 90%;
margin: 10px auto;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
#top
{
padding: .5em;
background-color: #ddd;
border-bottom: 1px solid gray;
}
#top h1
{
padding: 0;
margin: 0;
}
#leftnav
{
float: left;
width: 160px;
margin: 0;
padding: 1em;
}
#content
{
margin-left: 200px;
border-left: 1px solid gray;
padding: 1em;
max-width: 36em;
}
#footer
{
clear: both;
margin: 0;
padding: .5em;
color: #333;
background-color: #ddd;
border-top: 1px solid gray;
}
#leftnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
</style>
</head>
<body>
<div id="container">
<div id="top">
<center><h1><img border="0" src="../images/xxx.jpg" width="537" height="55" alt="sample"></h1></center>
</div>
<div id="leftnav">
I have a two column layout that I want to be centered, below is what I have can anyone tell me what is needed so that it shows center and not to the left as it is now thanks
<style type="text/css">
#container
{
width: 90%;
margin: 10px auto;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
#top
{
padding: .5em;
background-color: #ddd;
border-bottom: 1px solid gray;
}
#top h1
{
padding: 0;
margin: 0;
}
#leftnav
{
float: left;
width: 160px;
margin: 0;
padding: 1em;
}
#content
{
margin-left: 200px;
border-left: 1px solid gray;
padding: 1em;
max-width: 36em;
}
#footer
{
clear: both;
margin: 0;
padding: .5em;
color: #333;
background-color: #ddd;
border-top: 1px solid gray;
}
#leftnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
</style>
</head>
<body>
<div id="container">
<div id="top">
<center><h1><img border="0" src="../images/xxx.jpg" width="537" height="55" alt="sample"></h1></center>
</div>
<div id="leftnav">