...

View Full Version : Maintaining centre alignment of php



jamaro
01-18-2008, 02:52 PM
I am currently customizing a shop page for a sports club. I have set up the template in html and it is called into the main page which is php. The template works perfectly on its own with all expected functionality in place and it also works perfectly in the php page.

Fine so far, however, the template is centered when viewed itself but when called into the php page it lose margins and becomes left aligned.

Tried basic
<center> type fixes to realign including auto margins fix but to no avail.

How do i realign a center aligned page for php use while retaining the core format of the template.

Suggestions gratefully received.

CSS extract


/************/
/* GLOBAL */
/************/

/* NON-HEADER */
*{
padding:0;
margin:0;
}
body {font-size:62.5%; background-color:rgb(255,255,255); font-family:verdana,arial,sans-serif;word-wrap: break-word;} /*Font-size: 1.0em = 10px when browser default size is 16px*/
.page-container {
width:900px;
margin:0px auto;
margin-top:10px;
margin-bottom:10px;
border:solid 1px rgb(150,150,150);
font-size:1em;
max-width: 900px;
}
.main {
clear:both;
width:900px;
padding-bottom:30px;
background:transparent url(/images/bg_main_withnav.jpg) top left repeat-y;
max-width: 900px;

Excavator
01-18-2008, 05:59 PM
Hello jamaro,
That bit you quoted looks like it should center the 900px wide .page-container. If that's your template there must be something in the page that loading it that is conflicting...

Hard to say without seeing it. Do you have a link?

Could tidy this up a bit:
.page-container {
width:900px;
/*margin:0px auto;
margin-top:10px;
margin-bottom:10px;*/
margin: 10px auto; /*this does the same as the 3 lines above it*/
border:solid 1px rgb(150,150,150);
font-size:1em;
max-width: 900px;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum