This topic is locked

Stylesheet -

4/26/2008 4:17:27 PM
PHPRunner General questions
R
richardbeaumont author

Hi
I am trying to adapt the page layout to fit in with an existing page style - where the whole page is centered in the browser window.
However - even if I delete all the CSS except my own - which I know works - the page aligns to the left.
I'm using a trial version - with the text that appears in red at the top. I notice that other text I have put in using <p> tags - is also in the same red, again even when the only css is my own. The font is also larger than it is with my original pages using my CSS.
This leads me to conclude that somewhere there is some styling code. perhaps linked to this trial version message, which is making this happen - and might this also be preventing my page centering propoerly.
Could this be the cause? and if I buy the licence and remove the warning message, will this problem also dissappear - or is there something else I am missing.
thanks
Richard

R
richardbeaumont author 4/26/2008

I have answered this myself now. I took the waring message out of one of the output htm files - and the problem went away. I presume it was cuase by the fact that the output was above the <body> tag.

R
richardbeaumont author 4/27/2008

No I was wrong. It only solved the problem for the login page. Other main table pages were still aligned over to the left. Anyone got any solutions?

I have answered this myself now. I took the waring message out of one of the output htm files - and the problem went away. I presume it was cuase by the fact that the output was above the <body> tag.

R
richardbeaumont author 4/27/2008

It gets worse I am afraid. Having a look in Firefox - the pages appear to center properly - but there is a huge white spece appearing - strangely in the middle of my header - where there is no code. Again I get this when only my CSS is in the style sheet.
The only modifications I made in the visual editor - were to take out most of the fixed percentage width attributes in the tables.
Ths product is looking much less attractive to me now - Its no good if I cannot integrate it with my existing site.
Richard

J
Jane 4/28/2008

Richard,
to centre all pages just add header and footer.

Create new header.php and footer.php files manually in the output/include directory and add following code in it:

  • header.php
    <table width="940" border="1" bordercolor="#5369C1" align="center" cellpadding="5">

    <tr>

    <td>


  • footer.php
    </td>

    </tr>

    </table>

R
richardbeaumont author 4/28/2008

Richard,

to centre all pages just add header and footer.

Create new header.php and footer.php files manually in the output/include directory and add following code in it:

  • header.php
  • footer.php


Jane, I appreciate this is one approach - which I noted has been used in some of the default templates, but I was really tring to avoid unnecessary use of a table like this. My existing site - from which I have taken the header and footer - uses a pair of divs with css margin: 0 auto; which works very well.
I think the problem is that your page templates are very slightly inconsistant in the way they insert the header and footer - sometimes the output adds some page content - HTML/script - between the body tag and my header, at other times it doesn't, and this may well be the cause of the problem.
I suggest that from a design point of view you should address this.
I note from another topic that you are working on a version that relies much less on tables and more on divs for page layout - clearly a good thing but it also makes it more important to be consistant.
Perhaps another way to get round it is to enable header and footer php files, as well as any custom CSS to be added before the build process, and then to display them in the visual editor so that they can be manipulated - by changing the CSS - at that point in the process, rather than afterwards.

R
richardbeaumont author 4/30/2008

I notice in the tutorial about integrating with an existing website that the demo shows adding html/head tags into the header.php file. However - these page elements are already generated by the application - and by default appear above the header file insertion point. Therefore I did not add those tages to my header file.
Is this where I went wrong - or is your tutorial incorrect?
thanks
Richard

R
richardbeaumont author 4/30/2008

SOLVED!!
It was all about the DOCTYPE - they are all different and sometimes missing in the html template files. If I copied DOCTYPE from the login.htm template into the others - the pages center perfectly.
This needs correcting.

T
tyguy 5/6/2008

SOLVED!!

It was all about the DOCTYPE - they are all different and sometimes missing in the html template files. If I copied DOCTYPE from the login.htm template into the others - the pages center perfectly.
This needs correcting.


Hi Rich,
I am experiencing the same problem. However it is only my filename_list.php that is not centering. I checked my other pages DOCTYPES and they all seem to match. Do you think you could go into more detail about how you matched your login.htm with the others.
Thank you!
Ty

T
tyguy 5/11/2008

bump... anyone got any ideas?
ty

R
richardbeaumont author 5/12/2008

bump... anyone got any ideas?

ty


Hi ty - sorry for not responding sooner. All I did was copy the DOCTYPE tag (and I believe the HEAD tag which contained some info) from my login page - which was good, to the output html file for the other pages, replacing any existing doc and head tags, and it worked. Sorry I can't be more specific - it was purely a trial and error discovered solution - and lots of time spent peering at two documents trying to see what was different about them
Richard