CSS vs. Layers

message from Jim Deitzel on 19 Jul 2004
Years ago when layers came out, I used them on a site. They were easy
to use, but very buggy.

After a site or two, I stopped using them and went back to tables. Not
long after, I began using CSS to style fonts and table colors.

Now, we can use CSS to design an entire site.

Here's my question... I completely understand why CSS is great. However
I'm unsure about layers. Sure, layers are really CSS styles that reside
at the page level instead of a style sheet, but are they now OK to use?

If so, I'm screaming ahead with layers because layers provide MANY
advantages when doing SEO stuff.

What are your thoughts. Are layers OK now?

Best Regards
Jim
 
Robert Barnett replied to Jim Deitzel on 19 Jul 2004
I don't know much about this since I am in the learning stages of it all.
But, from what I have gathered from reading here and other places as well as
from books on the subject I have decided that right now Layers are not a
very good way to go still.

For me the big drawback is that between IE, Opera, Mozilla, etc. there seems
to be some major and minor problems. IE I think has most of the problems but
the others do have problems as well they are just little things like in one
there is a 5 pixel shift this way or that way that isn't in the others, etc.

What it all means at the way I understand it is that you need to have
different style sheets for each browser and each browser version. Each one
design for the browser in question. For me this is just too much trouble and
not worth the hassle.

Also, the playing around I have done with layers I have found that I don't
really like working with them. Getting them placed, and aligned, etc. I
think is much harder than with tables.

So for me at least I am sticking with tables and using CSS for everything
else. Maybe once IE gets fixed (not holding my breath there) things will
change. Right now I think layers are far too complicated for what little
they offer.

Just me 2 cents,

Robert
 
Murray *TMM* replied to Robert Barnett on 19 Jul 2004
I think this is *mostly* urban legend, rumor, and falsities. An absolutely
positioned element is positioned identically in all browsers. Now - if what
you mean is that it's easy to get onesself into trouble by misusing them,
then that's correct, just as it is with any tool.

I don't blame you - it would be for me, too, if it were true. Thankfully
it's not. Just check this site in whatever browser and tell me if it looks
OK to you -

http://www.great-web-sights.com

It's certainly a matter of personal style and experience, but I think that
this is not correct, either. However, whatever works for you is fine.

There's no time like the present to start learning other tools and
techniques. You will be surprised how 'thin' and 'shallow' some of these
urban legends are.

Take a look at the code in the page I linked above. Try doing that page
with tables and only getting that much code. Try doing a fly-out menu
without layers. In my mind, it would be impossible to work without them,
but that's a personal opinion.
 
Robert Barnett replied to Murray *TMM* on 19 Jul 2004
Then why for example does some of Project Sevens things like their CSS Fast
Packs have workarounds for browser alignment issues. That is unless I am
reading the manuals wrong.

I have also seen posts here with similar problems. Opera aligns something 5
pixels this way or that way compared to IE, etc.

It is possible that I am misunderstanding what is being said, but it seems
clear to me.

Robert
 
Murray *TMM* replied to Robert Barnett on 20 Jul 2004
The tweaks that you are seeing will only come into play when you are using
some of the layout techniques that are used on the PVII site. If you are
not positioning things with floats you may never have a need to use those
browser-specific adjustment methods. If you are using ordinary "layers", or
ordinary positioned divisions, you will never need them.
 
Al Sparber- PVII replied to Murray *TMM* on 23 Jul 2004
If the rendered width of your "Layers" is critical to your layout and
you are using padding and/or borders on your "Layers", then you
certainly do need to provide fixes.
 
Robert Barnett replied to Murray *TMM* on 20 Jul 2004
Thank you for pointing that out. Learn something new everyday, especially
when you don't know a lot on the subject to start with. :)

Robert
 
Murray *TMM* replied to Robert Barnett on 20 Jul 2004
You're welcome. You've just lost an excuse not to use CSS for layout, bud!
8)
 
Robert Barnett replied to Murray *TMM* on 20 Jul 2004
Maybe. But, I will stick with tables. I do plan to play around with CSS for
layout and I am using CSS more and more, but as far as doing a full site
with CSS layout I am not to that stage yet.

I just wish I could find a book on CSS done the way I would like. What I
would like is one that does CSS by the object. Like <table> and then
explains what CSS commands are applicable and what problems if any the
commands have from browser to browser. Right now I am finding that things
that should logically work applied to say a table don't always work. So just
having a book that explains all of the CSS commands without really putting
them in "object" context isn't really useful. Anyone know of such a book, I
think it would make a great reference.

Robert
 
offill replied to Robert Barnett on 21 Jul 2004
That makes two of us that would like such a book.

Also, is there a way to "center" position Layers as one can with a table, so
that different browsers at different Resolutions see the page content in the
center?
 
Jim Deitzel replied to offill on 21 Jul 2004
ProjectSeven has a great extension that will position your layers in the
center. It even works when you resize a browser.
 
Al Sparber- PVII replied to offill on 23 Jul 2004
http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

Don't forget all those IE5 and 5.5 users out there :-)
 
Murray *TMM* replied to Al Sparber- PVII on 23 Jul 2004
body { text-align:center; }
#wrapper { text-align:left; }
 
Murray *TMM* replied to Al Sparber- PVII on 23 Jul 2004
8)
 
Mark replied to offill on 21 Jul 2004
I've just read "Cascading Style Sheets - Separating Content from
Presentation - second edition - ISBN 1-59059-231-X see www.friendsofed.com.

The book takes you through the theory and finishes with implementing CSS in
the real world and the differences between browses.

Up until now all my sites have been table controlled with a bit of CSS for
fonts, cell formatting etc. A client asked me to make his site more
accessible for users with disabilities. I resisted at first, but did some
research around the web and realised there was a huge amount about
CSS/Layers that I didn't know.

This book has filled the gap. There's still lots of detail I don't know
which I'll only learn when I build real sites. However I've got 2 sites on
the go at the moment and I've built their designs usings <divs> only. The
benefits to me are:

1. Easy option of printer friendly pages
2. Looks better on a PDA using the printer version
3. Accessible for users with disabilities

Now when I'm selling to clients

1. I show them a print preview of their site plus competitors, which usually
miss the right edge of text
2. Show them a site on a PDA, highlighting the fact that it's not a big
issue today but month by month more users will be accessing via their
PDA/WIFI
3. Intimate that making sites accessible for all users is not law yet but
it's likely

Finally, on both the current projects, I've got the client to sign off that
Netscape 4 should be ignored, so the remaining compatibility issues aren't
too much of a pain.

Mark
 
darrel replied to Mark on 21 Jul 2004
This is a little backwards compared to the rest of your arguments.

One advantage of an all CSS layout is that you can easily make it NN4
compatible. Just hide the style sheets completely (or give NN4 it's own
style sheet) and your content is all there and easily accessible. Maybe not
as pretty, but all there. ;o)

-Darrel
 
Mark replied to darrel on 21 Jul 2004
Possibly, but

1. Netscape 4 only accounts for 0.3% of browsers
2. My clients are commercial in business to business environments where most
are using IE
3. Netscape 4 is 8 years old and unsupported
4. There's a free replacement in Firefox

How long do we go on supporting obsolete stuff? Should Macromedia run on
CPM? Should the latest tv products run on 441 lines? Should I run on
organic food?
 
Mark replied to Mark on 21 Jul 2004
Wow - I never realised this would generate so much heat!

I build web sites for clients. Of course, I'm realistic about the target
audience. Statements like "0.3% of all people surfing the web is how much?
1.000? 100.000? A million?" are the stuff that caused the dotcom boom and
bust. One of my current projects is for a client that can only sell its
services to the top 500 corporations in the UK. None of the key personnel
in those companies is searching for my client on Netscape. So why waste
time even reviewing this site in Netscape?
 
Murray *TMM* replied to Mark on 21 Jul 2004
Makes sense. For that site. Just remember that what works for you may not
work for anyone else.
 
Mark replied to Murray *TMM* on 21 Jul 2004
Thanks

p.s. words like "solipsistic" aren't accessible to 0.3% of browsers :-)
 
Murray *TMM* replied to Mark on 21 Jul 2004
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"Mark" <mark@forums.com> wrote in message
news:cdmjms$ckr$1@forums.macromedia.com...
 
Murray *TMM* replied to Mark on 21 Jul 2004
Ooo - I like that analogy. So, in that case, a radio that gets TV audio
would be the functional equivalent to a screen reader?
 
Al Sparber- PVII replied to Mark on 23 Jul 2004
I think you missed Darrel's point. Simply hiding the style sheet from
version 4 browsers requires no extraordinary effort and results in a
perfectly accessible, but unstyled page that everyone can read.
 
Mark replied to Al Sparber- PVII on 23 Jul 2004
If that's all it takes it's worth a try - thanks
 
Murray *TMM* replied to Mark on 21 Jul 2004
Web-wide, perhaps. In my demographic it's not true, however. That's why
it's very dangerous to apply statistics collected from one demographic with
a broad brush into a totally different demographic. Besides, I'd like to
see where you find that it's only 0.3 percent - I suspect you have a
misplaced decimal there.

You might be surprised what the non-most population is using then - do you
know?

Netscape continues to release upgrades. Where do you see that it's
unsupported?

Most of the people who are using NN4x are unaware of browser replacements,
in my experience.
 
Murray *TMM* replied to Murray *TMM* on 21 Jul 2004
No.

"Netscape Communicator 4.8 was released from Netscape in August 2002. It
includes Navigator, Messenger, Composer, AOL Instant Messenger 3.0, Netscape
Radio, RealPlayer G2, Winamp (Windows only), PalmPilot Synch tools (Windows
only), plus multimedia plug-ins and 56 bit standard encryption."

Also -

"You cannot - as a web developer - rely only on statistics. Statistics can
often be misleading.
Global averages may not always be relevant to your web site. Different sites
attract different audiences. Some web sites attract professional developers
using professional hardware, other sites attract hobbyists using older low
spec computers.

Also be aware that many stats may have an incomplete or faulty browser
detection. It is quite common by many web stats report programs, not to
detect new browsers like Opera and Netscape 6 or 7 from the web log.

(The statistics above are extracted from W3Schools' log-files, but we are
also monitoring other sources around the Internet to assure the quality of
these figures) "

In my mind, it's not likely that any user with NN4x is going to spend time
on the W3 site.
 
Robert Barnett replied to Murray *TMM* on 21 Jul 2004
Sorry, but unless your trying to sell something on your site I don't think
under many circumstances designing for NS4 is worth while. Most people by
this time have upgraded to at least Windows 95 and will have left NS4 long
ago.

My feeling is that those that haven't are really bright enough to use a web
site well any ways. If you can spend less than 3 minutes making your site
work with NS4 then that is fine, but to spend hours of your time or money or
your clients money is a waste.

It is time people moved on, if they don't then that is their problem.

Robert
 
James Shook replied to Robert Barnett on 22 Jul 2004
Where do I take the test so I can know if I'm bright enough to use a web
site well?
 
Robert Barnett replied to James Shook on 22 Jul 2004
If you are using a version 4 browser then you failed. :)

Lets face it people that want to get the most out of the web and the best
experience from the sites they visit know they need a modern browser to do
it.

Robert
 
Gary White replied to Robert Barnett on 22 Jul 2004
However, what many people fail to realize is that the majority of people
surfing the web are not the least interested in the "experience". They
want information.

Gary
 
Michael Fesser replied to Robert Barnett on 23 Jul 2004
.oO(Robert Barnett)

Am I the only one who don't want an "experience", but informations? Am I
the only one who - while using true modern browsers - disables most of
their multimedia stuff (plugins, animations, scripting, sound, ...)?

(There's at least a little problem with disabled animations - I don't
get the real cartoon on userfriendly.org when there's a nag strip ... ;)

Micha
 
James Shook replied to Robert Barnett on 22 Jul 2004
No, I won't face that at all. Your attitude towards your potential
viewers leaves much to be desired. There are many, many reasons why
someone might be using a V. 4 browser, and if they are doing so it
doesn't necessarily mean they are ignorant as you seem to think.
 
Murray *TMM* replied to James Shook on 22 Jul 2004
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
"James Shook" <jshook@dont_mail.com> wrote in message
news:cdoe3m$k6s$2@forums.macromedia.com...
 
Robert Barnett replied to Murray *TMM* on 22 Jul 2004
Murray, that hurts! *^)
 
Murray *TMM* replied to Robert Barnett on 22 Jul 2004
But your position is insensitive. People use whatever browser they use.
Period.

Your job as a web developer is to consider what browsers people use when you
build pages. Your job is *not* to change the browser they use. If they use
a browser that makes your job uncomfortable, then get a new job.
 
Robert Barnett replied to Murray *TMM* on 22 Jul 2004
I have no intentions of trying to get people to change browsers. It isn't my
job. Neither is wasting time and money on designing for the small hand full
of people that either can't switch, don't want to switch or aren't bright
enough to switch. That to me is like coming out with a line of clothing for
blue people. Unless the blueman group starts having kids, it isn't a very
bright idea and not worth the time. Unless people start throwing themselves
in to toilet bowls filled with Tidy Bowl.

It maybe insensitive, but that isn't the point. I think it is just as
insensitive for people to continue using an 8 year old browser that was crap
before it was released for use.

Any ways you can design for who you want and I will design for who I want. I
sleep fine at night over this choice.

Robert
 
Mark replied to Murray *TMM* on 22 Jul 2004
My wife used to accuse me of being insensitive - now she just thinks I'm
inaccessible.
 
Murray *TMM* replied to Mark on 22 Jul 2004
Get Bobby.... 8)
 
Al Sparber- PVII replied to Robert Barnett on 22 Jul 2004
The fixes are for older versions of IE. They are simple fixes.
 
Murray *TMM* replied to Jim Deitzel on 19 Jul 2004
Were you using Netscape <layer> tags?

They always have been.

I'm not aware of any. What do you have in mind?
 
Jim Deitzel replied to Murray *TMM* on 19 Jul 2004
Yes, I was using Netscape layers. I used Netscape browsers back then.

But thanks for making me feel comfortable with using layers again.
 
Paul Anthony replied to Murray *TMM* on 19 Jul 2004
Using CSS for layout exposes content quicker to spiders.
http://www.alistapart.com/articles/seo/

Paul.

"Murray *TMM*" <forums@HAHAgreat-web-sights.com> wrote in message
news:cdgdnv$8la$1@forums.macromedia.com...
 
Murray *TMM* replied to Paul Anthony on 19 Jul 2004
That's an overinterpretation of the facts, however. Spiders don't care how
fast the info comes at them, nor do they care about the structural markup
around the information. They look for SEMANTIC markup. The rest is
ignored.

I couldn't agree that exposing content to search engines *faster* is either
a characteristic of layers or of spiders.
 
Jim Deitzel replied to Paul Anthony on 19 Jul 2004
Yes. The less code on the page, the better it is for spiders. Also,
you can position the most important section of 'content' at the top of
the page as opposed to having it fall in order of your <div> tags.

The whitepapers for the new Microsoft browser speaks to it's favoring of
CSS pages. Then you throw in layers to position your content in a 'code
level' heirarchy and you're Gold!
 
Jim Deitzel replied to Paul Anthony on 19 Jul 2004
Yes. The less code on the page, the better it is for spiders. Also,
you can position the most important section of 'content' at the top of
the page as opposed to having it fall in order of your <div> tags.

The whitepapers for the new Microsoft browser speaks to it's favoring of
CSS pages. Then you throw in layers to position your content in a 'code
level' heirarchy and you're Gold!
 
darrel replied to Jim Deitzel on 19 Jul 2004
I'm not holding my breath.

;o)

-Darrel
 
Al Sparber- PVII replied to darrel on 22 Jul 2004
I had occasion to visit a neighbor who uses MSN for connectivity and who
is running the new MSN browser. Take a deep breath - it's a lot more
standards-compliant than you may think and represents but a fraction of
what will be released with Longhorn. It may still be a ways to release,
but the technology is there.
 
Michael Fesser replied to Jim Deitzel on 19 Jul 2004
.oO(Jim Deitzel)

Not the best for spiders. They grab the content as-declared, not
as-repositioned.

Uh oh ...

I don't use "layers" at all. In most cases I don't even need
positioning, I prefer the normal and flexible flow of elements.

Micha
 
Murray *TMM* replied to Jim Deitzel on 19 Jul 2004
Personally, I think that's moose pucky. But what do I know? 8)
 

Archived message: CSS vs. Layers (Macromedia Dreamweaver Web Design)