Jump to content

css layers vs html pages


thosecars82

Recommended Posts

Hello there

 

It turns out that I do not know very well when I should use css layers instead of html 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 html 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 html 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 html 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

 

 

Link to comment
Share on other sites

the answer is...

 

it depends...

 

on what you want to achieve 'layers' is something I here graphic designers use a lot - for me teh web doesn't have 'layers' as such.  Sure you can use css to control stacking order of elements placed above another (in a layer fashion type thing) but all this is an 'illusion' that is created with css or javascript - both of which can be made to disappear - leaving you with not 'layers' anyway.

 

So decide what you want to do and then - In my opinion if the content of these pages are unrelated then I would use separate html files.

Link to comment
Share on other sites

Using 'layers' can add decent functionality, but you will take a hit on your SEO rankings if you do it. So if its any kind of site you want people to be able to find through a search engine, you should put all your content on different pages.

 

Also, all your content for your entire site will have to be downloaded if you use 'layers', so your page load time will increase significantly. If you have any javascript that is run on page load, this means that it wont be run for a long time.

Link to comment
Share on other sites

Like haku says, it is not a good idea for SEO.

 

But, more important, it is BAD semantic markup. The point of css is to remove unnecessary code from the page markup, not create more.

 

"Layers" are a DreamWeaver concept. What they are in the real world is the css layout element "position:absolute" with javascript as a dynamic on/off control.

 

Ever look at the jscript dreamweaver creates?

 

Avoid it whenever possible.

 

It sound to me like you should look into coding using AJAX.

 

Link to comment
Share on other sites

Yes AJAX would be behind the success of these layers. I have read many books concerning AJAX (almost equivalent idea to 'layers'). You should only use it when it helps the functionality of the site. Keep it mind that it may lower download times and such but the BACK button would not work (which is the #2 navigation method, right after the typical link).

 

Ask yourself, does the advantage of using layers outweigh a quick page load?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.