PDA

View Full Version : Display php pages in a single cell HELP PLEASE


kinger251285
01-13-2010, 12:26 AM
Hi

I have gone from using frames to tables however i have stumbled across a problem. I cannot get the content of my site to display as i require. I have a table, with one cell for the header, one for a left nav bar alongside another i require the content to sit in. I used to be able to do this with frames but they were not acting as i required therefore switched to tables.

Can anyone please help?

I have tried href to the id'd cell aswell but that doesnt work.

edbr
01-13-2010, 01:23 AM
it sounds like you are expecting tables to behave as frames. you should re think your approach i would suggest.
use divs not tables or frames, this really is the way to go. make pages to display your content , your repeating page items that require downloading will be cached for use in the new page. there will be mant advantages this way in SEO and cross browser rendering

kinger251285
01-13-2010, 01:27 AM
Thing is im not clued up on css or am i keen on doing lots of coding and have already started on the approach i have taken. If this way is not possible then for the time being i iwll have to use the work ive done as a template and base all my pages around that. Then once i have something up and running i will advance to css and improve my design.

So can the way i want to be done?

Thanks in advance for your response.

edbr
01-13-2010, 01:30 AM
using iframes, but building on shaky foundations is never a good idea IMO

kinger251285
01-13-2010, 01:36 AM
Thanks for your help! Im not keen on using i frames either. Ill do it the old fasioned way for now, use what i have as a template and create the multiple pages i nedd using that then linking to them that way. Unless anyone else can come up with a solution??

Corrosive
01-13-2010, 07:22 AM
Ed is spot on. Websites built with CSS and divs is the way to go. A visitors browser will cache the header and sidebar better with CSS to reduce download times and if you are looking for an easy way to update consistent elements of your pages then use SSI (server side includes)

http://www.dreamweaverclub.com/php-includes.php

There isn't a solution other than using the correct tools for the job :)

kinger251285
01-14-2010, 06:21 PM
Hi

I have spent the last day studying css and playing around. I have finally designed a site the way i want it however now using divs i still have the same problem as before???

I cannot get the linked pages to open in the div content container.

Please help!

gentleone
01-14-2010, 06:29 PM
You can use AJAX to achieve that, but is SEO-wise not recommend (unless you want to load photos or images into that div).

Google for 'loading content in a div using AJAX'.

Corrosive
01-14-2010, 06:48 PM
It might be better to look at the underlying reasons why you want your site to work like this. What are you trying to achieve? A conventional website will have a number of pages with static content that are linked together to create the site. What are you wanting that is different?

kinger251285
01-14-2010, 06:54 PM
I was intending to have the user stay on the intial site page and load the subsequent linked pages in the div. That way they would be in the one place all the tiem maximising their experience due to quick uploads etc. I know i can acheive a site i want by having a template and linking each page thats not a problem. I just thought if having just the main page and the others load within it like with frames then this would be a good idea.

Corrosive
01-14-2010, 07:06 PM
I just thought if having just the main page and the others load within it like with frames then this would be a good idea.

No, not a good idea at all!

If you build your site well, optimise images for web and have mainly consistent page elements then the users browser will cache most of the site and not really make any discernible difference to user experience.

In fact, anyone who wants to visit your site because Google has thrown up an article or item they are interested in, it will get confusing as hell when they don't land on the page they expect to.

This approach is also not a good idea for SEO because you won't be able to offer meta tags, titles and other stuff to tell a Search Engine what a page is about.

Use conventional design and get on with building your site :wink:

gentleone
01-15-2010, 12:02 AM
No, not a good idea at all!

If you build your site well, optimise images for web and have mainly consistent page elements then the users browser will cache most of the site and not really make any discernible difference to user experience.

In fact, anyone who wants to visit your site because Google has thrown up an article or item they are interested in, it will get confusing as hell when they don't land on the page they expect to.

This approach is also not a good idea for SEO because you won't be able to offer meta tags, titles and other stuff to tell a Search Engine what a page is about.

Use conventional design and get on with building your site :wink:

Amen! :):):)