Forum Moderators: coopster

Message Too Old, No Replies

html page in centre of screen

         

jackvull

12:33 pm on Dec 29, 2005 (gmt 0)

10+ Year Member



Hi
I have a page, which I have centered by using:
<center>
<div>
other html
<iframe> </iframe>
</div>
</center>

This is so that the page appears in the centre of every browser resolution, whether 800x 600, 1200 x 768, etc.

However, I am using server side scripting to include certain elements on the page. For example, there'a a home page, a contact page, etc.
Everything is the same in the page except for the comments in the middle. I've put this in an iframe because absolute positioning won't work very well, i.e. the position is different in every browser depending on resolution.

I could change the iframe every time a new page link is clicked but I don't want to have to pass the src for the iframe in the page request using PHP.

Is there an alternative way?

I could include the top half of the page, then add the PHP code and then include the bottom half of the page but thought this might be a bit messy?

coopster

9:46 pm on Jan 5, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Not really, and it is probably more common than using iframes. There is an example of what you seem to be describing in our PHP Forum Library [webmasterworld.com] called A dynamic site in 2 minutes [webmasterworld.com]