Hi I am unable to centre my blog boxes in the middle of the right hand side column on my website, Can anyone help me with this ,
Thanks
Alex
www.newcityexplorer.com
Please explain, do you want a fluid layout or a fixed layout. The reason I ask is that you are using a mixture of techniques at the moment.
The main object is to get a proper construction for your document as per
The total width of the above can be automatic, depending on the witdh of the viewing window (this is harder to achieve) or a fixed width which is usually set at 980px or thereabouts.
The way we achieve an overall wdith is to place the above elements (DIV's) within a wrapper. I use the body element as the wrapper, but you have got a DIV called wrapper as your wrapper which is OK. At the moment, your sidebar is not within the wrapper element. Also, you must adjust the widths of the article and sidebar so that they and any margins do fit within the width of the overall wrapper.
Gramps
To give you an idea of a layout, copy and paste the following into a new document and view in your favourite browser.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
* {
padding: 0;
margin: 0;
}
html {
background: rgb(173,217,228); /* Old browsers */
}
body {
width: 980px;
margin: auto;
}
h1 {
font-size: 2.3em;
text-align: center;
margin: 0.5em;
}
.header {
background: url(http://www.newcityexplorer.com/Pictures/Logo_2.png) no-repeat 20px 10px;
height: 100px;
}
.nav {
border-radius:12px;
border: solid 1px silver;
height: 35px;
background: #696;
}
.aside {
border-radius:12px;
border: solid 1px silver;
height: 200px;
width: 32%;
float: right;
background: #CCC;
}
.article {
border-radius:12px;
border: solid 1px silver;
height: 200px;
width: 65%;
float: left;
background: #FFF;
}
.footer {
border-radius:12px;
border: solid 1px silver;
height: 50px;
margin-top: 200px;
background: #696;
}
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
</style>
</head>
<body>
<div class="header"></div>
<div class="nav"></div>
<h1>Where will you fly next?</h1>
<div class="aside"></div>
<div class="article"></div>
<br class="clearfix">
<div class="footer"></div>
</body>
</html>
Gramps
North America
Europe, Middle East and Africa
Asia Pacific