Jump to content

TABLEs vs CSS?


adamcannon

Recommended Posts

Both tables and divs have their advantages and disadvantages. You are correct in that you'll need at least a   in the cell for it to even render, especially if you are using borders. With divs you can be more flexible. BUT, in my experience, using divs makes it harder to align the table layout on the far right side. Especially if you are trying for something like a 3x3 look. If the text on the top fills up the div and the text under that doesn't, they might be different lengths in the end.

 

Also, You have to be careful when putting divs on the same row. IF you try to float too many and mess up the percentages then you'll have one drop down. With tables, you're guaranteed that they'll all be all the same row no matter what.

 

It all depends on what you want to do. You can definitely use CSS with your tables to achieve the same look. I've done CSS with tables a ton and would be glad to help any way that I can.

Link to comment
https://forums.phpfreaks.com/topic/50662-tables-vs-css/#findComment-249022
Share on other sites

Divs are the best way to lay out a page.  The flexibility of divs and css and doctype declarations are truely your friend.

 

As I have said before tables are for eating dinner off or displaying tabulated data. I have also stated that a couple fo days working with divs and learning a bit of css will be the most productive in your time as a web page developer.

 

Tables have MUCH more ability to destroy the look of your page and when nesting them the potential porblems increase exponentially.  As Veridicus states, managing your content by enclosing associated elements in a div is by far the best way to manage your sites.  Not to mention the fact that some users don't have the benefit of good eyesight and use other clients to view your page.  Tables can make screen readers render your page completly unintelligable.

 

To desing a good site you should start from teh premise that the person seeing you page has css off, javascript off and images disabled - if then reading your page still makes sense you are doing well.  You can then add all the nice bits on and create a rich and engaging visual experience.

 

Ask your self this - all (most) the professionals in the game endevour to follow a standards complinat route and separate content from style from document effects why? A - its the easiest way to develop/manage/update sites and produce good end result....

Link to comment
https://forums.phpfreaks.com/topic/50662-tables-vs-css/#findComment-249437
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.