SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    St. Charles
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Layers and Tables

    I have read on this forum where people say they prefer to use CSS over Tables, but that confuses me as tables are for design like to split up the page in sections and CSS is just for Font styles... So Im confused there (correct me if Im wrong)

    And I have read on here where people have said tables or old and layers are the new? I have never used layers and I use Dreamweaver, can you do layers in that and if so why is it btter than tables and waht else is differnt from the two?

  2. #2
    Pointiest Petitions carrotflowers's Avatar
    Join Date
    Jul 2003
    Location
    Suburbs of DC (MD)
    Posts
    595
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CSS goes far beyond styling fonts. It is a powerful tool that allows you to separate presentation from content. With a large site, if you controlled all the presentation from one external stylesheet, and wanted to for instance change the link colors for every page (juat a basic example) you could change just the one stylesheet rather than every page on the site. I see from your other thread that you are just learning CSS. There is an excellent beginner's tutorial at Webmonkey. http://hotwired.lycos.com/webmonkey/...tutorial1.html

    But visit sites like http://meyerweb.com/eric/css/edge/ and http://csszengarden.com to get a feel for what you can do with CSS.

    I believe layers on the other hand are older and poorly supported.

  3. #3
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Tables for layout are ancient

    Have a look at my personal site, it was all done without a single table

    Yeah I've heard layers are not recommended anymore. With CSS you can have <div>'s or <span>'s behave just like layers, and I'm sure there are many more elements that could behave like them.

  4. #4
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to check out this recent thread:
    Layers vs tables...! I think it will help answer some of your questions.

  5. #5
    Pointiest Petitions carrotflowers's Avatar
    Join Date
    Jul 2003
    Location
    Suburbs of DC (MD)
    Posts
    595
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just want to point out that in that thread referenced, the layers vs table, I read a certain amount of misrepresentation of what layers are vs CSS. It almost seemed that somebody meant CSS vs tables and thinks layers are the same.

  6. #6
    Pointiest Petitions carrotflowers's Avatar
    Join Date
    Jul 2003
    Location
    Suburbs of DC (MD)
    Posts
    595
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oops I meant to hit Go Advanced not post Quick Reply.

    Anyway...lokodezine, I assume you are just getting started with some of the web design stuff, or at least CSS, based on the other thread I've been working with you on. I can see you read that table vs CSS thread, and it might have confused you. There were misleading statements that I think I should point out. For instance , it was stated that css is an overused term, stylesheets on their own don't do anything and that it is the combination of a style sheet and, say, a <div> tag that creates layers.

    Not exactly. CSS stands for Cascading Style Sheets. Anything you put in a stylesheet, including a way of using CSS that some call "layers" is CSS. Layers are not their own technology or tool. Layers as presented in CSS are part of CSS, and really are they are is a way to absolutely place an element on your page. Layers in CSS is just a way of how to implement CSS to treat elements on an HTML page as if they were on different layers, overlapping each other etc...(see this link for someone explaining "layers" in CSS--they call it layering...it's just CSS http://www.echoecho.com/csslayers.htm)

    It's confusing, yes, because there are other "Layers" in web design.

    1. Layers as developed by Netscape a long time ago: http://www.htmlgoodies.com/beyond/layer.html
    The thing to take from this, he is actually placing elements in things called layers, a la <LAYER NAME="under" LEFT=250 TOP=500>

    There is no "layer name ="this"> in CSS.

    And note where he says it only works in Netscape.

    2. Layers in Dreamweaver:
    Layers in Dreamweaver is CSS. Period. It is not a separate thing. thanks to Dreamweaver giving it a separate tab from CSS and calling it "layers" I believe it creates the confusion that CSS is just styles but when you get into positioning etc it's something else. Well it's not, it's CSS. Note that the code produced by Dreamweaver when you create a layer is CSS code.

    So, lokodezine, I repeat what I said in the other thread, you should read up on CSS and what it can do. Maybe grab a copy of the Sitepoint book on Design without tables using CSS, (I forget the real title.)

    But understand that there is no third, new option called layers.

  7. #7
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mstwntd
    Tables for layout are ancient
    ...
    Yeah I've heard layers are not recommended anymore. With CSS you can have <div>'s or <span>'s behave just like layers, and I'm sure there are many more elements that could behave like them.
    I wouldn't call tables for layout ancient. I mean... the vast majority of Web sites out there still use tables for layout. Even ones that were designed yesterday.

    But true, it shouldn't be that way. CSS is a much better choice.

    If you must use tables, don't include presentational information in the HTML... use CSS to style them.

    And to break apart furryyuri's post and make this as clear as possible:

    1. <layer> never existed as an element in any HTML specification. it was created by Netscape, and only worked in Netscape. Don't use it.
    2. Some people use the term layer to refer to the layering of elements on a Web page (such as <div>). Dreamweaver uses this term, as furryyuri pointed out. But this is not a layer element... all this refers to is positioning using CSS. Please don't say "layer". Call it CSS positioning, or CSS layouts, etc.
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  8. #8
    SitePoint Zealot Skibum1321's Avatar
    Join Date
    Jun 2003
    Location
    Malden, MA
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tables are for design like to split up the page in sections and CSS is just for Font styles
    Tables are not and never were intended for design. Designers abuse tables to create designs that could not have been made otherwise.
    CSS is for designing webpages. There are some obvious problems with it that still need to be hacked around, but its sole purpose is to style a webpage.
    Keith Rousseau


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •