•  
Home    Archive

News: Our Community Comic "Gunbaby" is and always will be open for submissions. Any submissions received will run on the site front page on Sundays.

00:00:30UncleRobotI know CPR...
18:39:34Chadm1nSpammers must die. Now.
16:56:16Chadm1nAs promised a few weeks ago, Webcomics Community has been upgraded!

Author Topic: Tables vs CSS  (Read 22000 times)

0 Members and 1 Guest are viewing this topic.

Offline Terrence Marks

  • Newbie
  • *
  • Posts: 7
    • You Say it First
Tables vs CSS
« on: April 23, 2010, 05:35:32 AM »
I've noticed, in the site reviews, a preference for positioning via CSS instead of tables.

As someone with a mostly-table-based site (who doesn't want to reconfigure everything unless he has to)

what are the advantages of using CSS?

Offline ran

  • Full Member
  • ***
  • Posts: 151
  • Oh so tired.
    • brainspill
Re: Tables vs CSS
« Reply #1 on: April 23, 2010, 08:49:42 AM »
With CSS, you define a bunch of classes. I'll try to explain it in a way you'll easily understand.

You know when you put tags around a sentence to make it bold, like this? <b>werdz</b>

Well, with CSS, you basically make up your own tags, but instead of bolding your text, you can do anything with it--you can change your font, text colour, put it in a box with a specific background and position it wherever you want on the page, align it, make it a rollover image, pretty much anything you can dream of, but without making a lot of changes to your hard code. You just need to remember the tag, and either put your css in your header, or link to an external file in your header. It's also really easy to make changes to without messing everything up.

Offline Terrence Marks

  • Newbie
  • *
  • Posts: 7
    • You Say it First
Re: Tables vs CSS
« Reply #2 on: April 23, 2010, 03:06:16 PM »
Yes.  I know what CSS is.

Is there a functional advantage to using CSS for layout and positioning instead of tables? 

Not "ease of use".  I've got the page built.  The easy thing is to leave it as is. 

In what circumstances will a CSS-based layout give the readers a better experience than a table-based layout?

Offline Dragon Powered

  • Senior Web Correspondent
  • Administrator
  • Full Member
  • *****
  • Posts: 120
  • Fractured
    • Dragon Powered
Re: Tables vs CSS
« Reply #3 on: April 23, 2010, 03:52:27 PM »
Basically, you can use CSS styles with your tables to do many of the same things division tags can do, and you can use divisions within your tables.  There is nothing wrong with mixing and matching.

Functionally, a pure CSS site will scale better for alternative devices, such as smartphones, that are used to view your webpage.  A pure CSS site will display in an easily readable format on text-only browsers as well, since the items will display more like a bullet list, whereas a table driven site kind of becomes a mess on text readers.

It really depends on what your site is delivering, and what audience you are aiming for. Tables have been a standard for a long time, and will display pretty much evenly across browsers. CSS is a new standard, and should display pretty much the same across all browsers except Internet Explorer, which for some reason STILL believes it should dictate what the web looks like.  You might need to use 'hacks' to get your site to display properly on different versions of IE.  Also, if your site is something like a forum, with multiple repeating sections in a page, tables seem to flow easier.  Aligning items on a page works great in CSS, but can get tricky when aligning the same item again, but in another spot on the page, and again, and again. Floats can crash, rollover attributes don't work uniformly, etc.


Offline mishi

  • Newbie
  • *
  • Posts: 7
  • ハーレクイン
    • Ryu-hime
Re: Tables vs CSS
« Reply #4 on: April 25, 2010, 05:22:45 PM »
Really, you should only use tables for text. Never for your basic layout. CSS has been the new standard for quite some time. It may seem like a big pain to learn a new way of coding, but it's actually a lot easier than messing around with tables once you get the hang of it. You have more control over styling in general, and the ability to make your site look a lot more professional. As dragon said there a few issues from browser to browser, but they are usually ie related and fixable after a little trial and error. I really recommend switching over to div and ditching the tables :3
~ ミシーひめ

Offline Terrence Marks

  • Newbie
  • *
  • Posts: 7
    • You Say it First
Re: Tables vs CSS
« Reply #5 on: April 26, 2010, 12:11:34 AM »
Thank you very much for all your help and advice.

I believe I'll leave things as they are for now; the last few attempts to convert to all-CSS have failed (particularly the cast page - http://yousayitfirst.com/cast/ - tables seem to handle the structure [two columns of variable size, with occasional bits in the middle] a lot more gracefully).

Offline operationremie

  • Full Member
  • ***
  • Posts: 101
  • i will no longer post.
Re: Tables vs CSS
« Reply #6 on: July 12, 2010, 08:12:57 AM »
i'm going to "hijack" this thread since I am trying to use CSS for my site instead of HTML since I feel css will be a much better option for me.

i get the whole defining everything with CSS but i think my issue is that I don't really know how to put things where i want them. i honestly would love to have someone help me on AIM or something to discuss it. i actually think i still have a jpg of how i want my site to look lol

if this is possible, i'd love the help

Offline Rob

  • Resident Dick!
  • Administrator
  • Hero Member
  • *****
  • Posts: 1324
  • Easily Confused, Feeble Minded Founder
    • Remedial Comics
Re: Tables vs CSS
« Reply #7 on: July 12, 2010, 07:17:06 PM »
I hope you get some help Remie. Unfortunately I know diddly about CSS. Keep trying though. There are some good "CSS for Dummies" books available that are pretty cheap if you get desperate.


Offline Dr. BlkKnight

  • Global Moderator
  • Full Member
  • *****
  • Posts: 129
  • Community Relations Coordinator
    • Crossing Death
Re: Tables vs CSS
« Reply #8 on: July 12, 2010, 07:21:40 PM »
I am trying to use CSS for my site instead of HTML since I feel css will be a much better option for me.

That's kind of an impossibility.

CSS enhances HTML, not replace it.

Offline operationremie

  • Full Member
  • ***
  • Posts: 101
  • i will no longer post.
Re: Tables vs CSS
« Reply #9 on: July 13, 2010, 04:36:25 AM »
I am trying to use CSS for my site instead of HTML since I feel css will be a much better option for me.

That's kind of an impossibility.

CSS enhances HTML, not replace it.

haha see, that's why i know nothing! i used HTML 3.0 for dummies to make my last site. i'm just an accountant, not a designer :P

Offline Alectric

  • Full Member
  • ***
  • Posts: 166
    • Estrangel
Re: Tables vs CSS
« Reply #10 on: July 13, 2010, 08:24:54 PM »
http://w3schools.com/

This site should really help you.  Organized, simple, and interactive tutorials in all aspects of web development with plenty of further references.  I recommend you take the HTML tutorial, and the follow it with the CSS tutorial.

Offline operationremie

  • Full Member
  • ***
  • Posts: 101
  • i will no longer post.
Re: Tables vs CSS
« Reply #11 on: July 14, 2010, 04:54:06 AM »
http://w3schools.com/

This site should really help you.  Organized, simple, and interactive tutorials in all aspects of web development with plenty of further references.  I recommend you take the HTML tutorial, and the follow it with the CSS tutorial.

thanks. i've been reading their stuff since i started trying to do my site and they have been helpful. i think it's just minor questions that i have.

Offline Dr. BlkKnight

  • Global Moderator
  • Full Member
  • *****
  • Posts: 129
  • Community Relations Coordinator
    • Crossing Death
Re: Tables vs CSS
« Reply #12 on: July 14, 2010, 03:01:44 PM »
Yeah, w3schools is like THE place to start out, but you will eventually get to a point where they can't support your needs properly. Then it's old-fashioned Googling.