Client Support Community Server Status Contact Us Client Login
Email Hosting Website Hosting Reseller Hosting VPS Hosting Dedicated Servers

    Join our Community      Check your private messages       Profile       Search       FAQ       Memberlist       Log in


[Fixed]php SSI for fixed page_header

 
Post new topic   Reply to topic    NetHosted Community Index -> General Support
carlos.poon Reply with quote
 NetHosted Customer

 

 Joined: 20 Sep 2004
 Posts: 88
 Location: London, UK

PostPosted: Fri Oct 22, 2004 12:53 pm    Post subject: [Fixed]php SSI for fixed page_header
 
Hello All,
I'm developing a .php site (that parses template .tpl files to display content).
I have a MainBody.php that 'includes' a PageHeader.php.

When I scroll in my browser, everything scrolls MainBody+PageHeader.
I want to make my page_header stay fixed at the top of the browser page, while only the mainbody scrolls.

I could achieve what I want using frames, but that will cause metatag/search engine/web spider problems..... So...
I have been told that I could use SSI (Server Side Includes) if my webhost supports it...
someone suggested using 'PHP SSI Coding' and have a MainBody.php that contains:
Code:
//MainBody//
<?php
include ("/PageHeader.php");
?>

...but i still don't understand how to achieve a fixed header & scrolling mainbody..

My questions are:
Does NetHosted support PHP SSI?
and
do you think this method will let me have a fixed PageHeader with a scrolling MainBody?

I know this is a bit of a difficult one, I just wanted some advice to make sure I wasn't chasing the impossible.

This is the only real reference I could find: http://www.tamingthebeast.net/articles/framesnoframes.htm 

Thanks,

Carlos


Last edited by carlos.poon on Wed Jan 26, 2005 4:41 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Oct 22, 2004 1:57 pm    Post subject:
 
Sure we support SSI, I suggest you use CSS to achieve what you want though it's very simple!

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
carlos.poon Reply with quote
 NetHosted Customer

 

 Joined: 20 Sep 2004
 Posts: 88
 Location: London, UK

PostPosted: Fri Oct 22, 2004 2:34 pm    Post subject: cool
 
Hello Andrew,
NetHosted - Andrew wrote:
Sure we support SSI, I suggest you use CSS to achieve what you want though it's very simple!

It's good to hear it is possibe.
Can you point me to any examples of a fixed header, with scrolling mainbody?
I haven't got a clue about CSS

Thanks
Carlos
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Oct 22, 2004 2:51 pm    Post subject:
 
I'm trying to find a nice tutorial for you carlos but am yet to find one, give me a bit more time to search!

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
carlos.poon Reply with quote
 NetHosted Customer

 

 Joined: 20 Sep 2004
 Posts: 88
 Location: London, UK

PostPosted: Fri Oct 22, 2004 2:56 pm    Post subject: thanks
 
Andrew - no rush at all, I can wait - This is not a life threatening situation, thankfully.. It only keeps me awake at night lol. Carlos

I just found 1 example that says it works in Mozilla & IE..
but it doesn't scroll all the way to the bottom of the page in IE (something to do with Quirks Mode and doctypes)

http://webpages.charter.net/mmmbeer/code/css/layouts/fixed/ 

So nearly there, but not quite.
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Oct 22, 2004 10:01 pm    Post subject:
 
Tony whipped up this for you:

Code:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fixed Header</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="generator" content="NoteTab Pro 4.95" />
<meta name="author" content="Tony" />
<meta name="description" content="Fixed Header" />
<meta name="keywords" content="Fixed, Header" />
<style type="text/css">
<!--
body
   {
   margin: 0;
   padding: 0;
   font: normal 9pt verdana,arial, helvetica, sans-serif;
   color: #000000;
   background: #ffffff;
   }
.header
   {
   position: absolute;     
   width: 100%;
   height: 180px;
   color: #ffffff;
   background: #000000 url(/images/anyimage.png) no-repeat fixed 20px 0;
   }
.contentz
   {
   position: absolute;     
   width: 100%;
   height: 65%;
   top: 35%;
   background: #ffffff;
   overflow: auto;
   }
-->
</style>
</head>
<body>

<div class="header">
<p style="margin: 20px 0 0 150px;">
Lots of text Lots of text Lots of text Lots of text 
</p>
</div>

<div class="contentz">
<p style="height: 2000px; margin-left: 1em;">
Lots of text Lots of text Lots of text Lots of text
Lots of text Lots of text Lots of text Lots of text
Lots of text Lots of text Lots of text Lots of text
</p>
</div>

</body>
</html>


hope that helps,

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
Mikee Reply with quote
 something funny

 

 Joined: 19 May 2004
 Posts: 84
 Location: Leeds, UK

PostPosted: Fri Oct 22, 2004 11:34 pm    Post subject:
 
As andrew said, the only way you'll be able to do it is either using frames (yuck yuck yuck), or iframes (even yucker), or CSS.

I dont know who told you to use Server side stuff, but it's impossible to get server side stuff to affect the way the user agent controls the page.

Andrews example will be the best option for you. The only problem with using overflowing divs is that you cant use the mousewheel to scroll down (if i remember correctly). (well, it's the case in either mozilla or IE).

HTH.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
carlos.poon Reply with quote
 NetHosted Customer

 

 Joined: 20 Sep 2004
 Posts: 88
 Location: London, UK

PostPosted: Fri Nov 05, 2004 4:42 pm    Post subject: okee
 
Thanks Andrew & Mikee,

I got it working finally, well working in IE, I have no scrolling in Mozilla:

http://www.vfx101.com/phpBB2 

Anyway... I'll get on to fixing the scrolling a little later.

Just wanted to say a thankyou to you guys for pointing me in the right direction

Regards,
Carlos
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5684
 

PostPosted: Fri Nov 05, 2004 4:43 pm    Post subject:
 
Glad you've got it working now Carlos

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
Post new topic   Reply to topic    NetHosted Community Index -> General Support
Page 1 of 1

User Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

 
Jump to: