css layers vs php page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thosecars82
Forum Commoner
Posts: 94
Joined: Thu Apr 03, 2008 6:31 am
Location: Arganda, Madrid
Contact:

css layers vs php page

Post by thosecars82 »

Hello there

It turns out that I do not know very well when I should use css layers instead of php pages. I am going to put an example in order to make it clear:

Let's say you have a typical site with a header, footer and a horizontal menu on the header. Then this horizontal menu has several buttons each of which take you to another php page with the same header and footer and the same horizontal menu.

Now, it just came to my mind this doubt:

I know that I could do this website with a different design from the explained above, that is to say, with just one html page and using different layers to show different content depending on the button which is pressed from the horizontal menu.

I would really like to know how to make this kind of decision of design:
1. When it is good to use just a page with several layers?
2. And when we should just use another php page

I think this questions are in the design field. Altough I know some css, some php and some dreamweaver, I am new at these things and above all at webdesign and therefore, I would really appreciate any suggestion, since I think you might have plenty of them.

I would like to learn proper uses of css layers to build websites. Otherwise I think I might be using layers for everything since it seems to me that you can do almost anything with just one simple php page and tons of layers. But I am sure I might be wrong, and there might be special circumstances in which layers are not recommended.

Thanks in advance
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Re: css layers vs php page

Post by andym01480 »

CSS Layer are a bad way of doing it in my opinion
Bandwidth - all the layers are downloaded at once
Speed - slow connections will get bored waiting
Compatability - working in all browsers? And old ones too

Content, Design and Behaviour are separate things and in good webdesign should be kept different.

CSS is good for design
PHP is good for serving different content
PHP and Javascript are used for behaviour
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: css layers vs php page

Post by Christopher »

I think you question is a design one and has little to do with PHP. PHP is used to generate HTML/CSS. CSS is used to style HTML. But your question is really a design choice of doing things in one page by hiding and revealing divs as opposed to linking to a new page.
(#10850)
thosecars82
Forum Commoner
Posts: 94
Joined: Thu Apr 03, 2008 6:31 am
Location: Arganda, Madrid
Contact:

Re: css layers vs php page

Post by thosecars82 »

arborint wrote:I think you question is a design one and has little to do with PHP. PHP is used to generate HTML/CSS. CSS is used to style HTML. But your question is really a design choice of doing things in one page by hiding and revealing divs as opposed to linking to a new page.
Thanks, exactly you understood my question perfectly at the first try. Well, I am trying to explain that a design forum and it is taking me a harder effort to let them understand what I want to know.Anyways, I guess this question is not proper for this forum, right?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: css layers vs php page

Post by Christopher »

I think the question of when and whether to do "web 2.0" layers vs "web 1.0" pages is an interesting one. Perhaps you should change the subject like to read: "css layers vs separate pages". Hopefully there are people here who have experience on when to choose one over the other.
(#10850)
thosecars82
Forum Commoner
Posts: 94
Joined: Thu Apr 03, 2008 6:31 am
Location: Arganda, Madrid
Contact:

css layers vs separate pages

Post by thosecars82 »

Thanks all of you for your suggestions. In fact, they are pretty usefull and interesting. I understand what you guys told me. As for the speed(BANDWITH), it seems obvious to me now. However I hadn't realized of that til you andym01480 told me. It would be really slow having to wait for all the content to download just to see the content you want to see.
Thanks again.
Post Reply