why is using css better then doing tables

Discussion in 'CSS' started by netpox, Mar 5, 2007.

  1. #1
    Why is using css better then doing tables?
     
    netpox, Mar 5, 2007 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    css equals less code on each page, less code means quicker loading time for your visitors.
     
    just-4-teens, Mar 5, 2007 IP
  3. MrX

    MrX Well-Known Member

    Messages:
    1,563
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Easier to manage. You can worry bout layout in the css file, and change everything around very simply.
     
    MrX, Mar 5, 2007 IP
  4. libertygone

    libertygone Active Member

    Messages:
    2,625
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    90
    #4
    CSS is much better than the use of tables. sure, tables may be a little easier to learn, but once you know even just a little CSS it's really cool what you can do. Linking your style sheet to your site is really ideal because then you can control the look of the site in one file instead of going to each page and updating it.

    There aren't many downsides to using CSS.
     
    libertygone, Mar 5, 2007 IP
  5. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Tables are slower than css. CSS designed sites looks better than tables with borders
     
    boyponga, Mar 9, 2007 IP
  6. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #6
    You might be potentially wrong here comparing the two things, making me guess you aren't quite sure about what you have said.

    What is CSS?
    Cascading Style Sheets. Language used to describe how an HTML document should be formatted.

    What is a table?
    A set of data arranged in rows and columns.

    Now compare the two concepts, can you.

    That's right, you are stating this from a newbie's point of view. Oh, am I protecting the old tables? :)
    No, not doing that. Just that over the time I've learned that getting involved into a discussion that is touching a comparison like "CSS vs Tables" makes fun. Also that is a waste of time, my sole opinoon. How can a table design look different than a CSS design? It's a 3 column vs a 3 column, just a different approach to achieving this. One takes 15 minutes, the other one takes a bit longer. Visitors see the same. Google doesn't mind, does it..
     
    Clive, Mar 9, 2007 IP
  7. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Wait wait wait, I am sure what I am talking about because for several years of my experience in web, I tried CSS as well as tables and I can conclude that tables are not that fast because some of my site are tables, and I saw the results. And for search engines, divs are easily spidered than tables.
     
    boyponga, Mar 10, 2007 IP
  8. gio

    gio Well-Known Member

    Messages:
    2,390
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    195
    #8
    Its because CSS loads faster than tables and also CSS is the future of laying out sites and contents. Its so much easier to maintain CSS than tables.
     
    gio, Mar 10, 2007 IP
  9. Mooseman

    Mooseman Peon

    Messages:
    453
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It's much easier and funnier once you've learned it. Tables just feels like a whole bunch unnessesary code
     
    Mooseman, Mar 10, 2007 IP
  10. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yeah, very difficult to understand than divs, it's just a div and content
     
    boyponga, Mar 11, 2007 IP
  11. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #11
    You can manage whole website from one css file only.
     
    VishalVasani, Mar 11, 2007 IP
  12. rodaniel

    rodaniel Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I've been trying to wrap my feeble brain around the concepts to convert from using tables to using DIVs but I'm having a bit of a tough time grasping the details. Can someone recommend a tutorial site for a rank newbie?

    Rob
    www.2dolphins.com
     
    rodaniel, Mar 11, 2007 IP
  13. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #13
    @Rob

    You don't convert from tables to divs. What you really do is use html as semantic and well structured markup. With any nontrivial table layout, the markup can be neither semantic nor well structured. The first order of business is to (re)learn html. That won't be easy because your mindset will be to try to add nonstructural tags and attributes to prettify the layout. HTML has zero to do with how the page looks. Its job is simply to tell the UA what each element in the document is.

    Send yourself to kindergarten. Google html tutorials. Work your way through some, skipping the parts about table layout, frames and iframes. Then do the same for css tutorials. That may seem a silly thing to do, but you'll have a lot of bad habits to break. That's as good a method to break them as I know.

    View the pages in my site (see sig line) with styles turned off or in a text browser like Lynx. You will see result of plain html that is well structured and semantic. View the source. There is no presentational markup. Turn the styles back on and see how the presentation is controlled by the css.

    Don't be surprised if you find it difficult to be so simple. :)

    cheers,

    gary
     
    kk5st, Mar 11, 2007 IP
  14. xluciusx

    xluciusx Peon

    Messages:
    470
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #14
    to me css is better becuase its easier to work with
    cleaner.. faster.
     
    xluciusx, Mar 11, 2007 IP
  15. interactivecode

    interactivecode Peon

    Messages:
    51
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Tables are not actually meant for layouts. DIV & CSS should be used for constructing layouts. As kk5st said, you should use semantic and well structured markup. It provides you more flexibility & control, easy maintenance, advanced tricks, lesser code. This allows wider compatibility and Search engine friendliness as well.
     
    interactivecode, Mar 11, 2007 IP
  16. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #16
    No one has said it in black and white yet so here goes:

    CSS allows you to separate content from presentation

    Thats a really important point to get because the rest stems from that single point. Think of HTML as "What I say" and CSS as "How I say it." Using CSS you can change how you say something (i.e. what it looks like) without changing the HTML.

    Imagine you want your site to be used on normal computers, PDAs, Nintendo Wii, Braille devices etc. Obviously you cant send the same thing to each device so you can just send a different CSS sheet to each device (i.e. you are changing how you say it depending on the device, but you are still saying the same thing), for example you send a cut-down simple layout to the PDA, a simplified interface for the Wii etc etc

    As others have said, you are using HTML for the meaning (i.e. the semantics) only now.

    Sounds like a lot of hassle but there are countless pay offs such as the site is a lot easier to maintain, you save bandwidth, you can meet your legal requirements for disabled access easier, better flexibility for end users, better support for printing, faster rendering, arguably better search engine treatment etc etc
     
    MattD, Mar 12, 2007 IP