Jump to content

Tables Vs Div For Page Layout


d3bruts1d

  

31 members have voted

  1. 1. Tables Vs Div For Page Layout

    • Tables
      22
    • Divisions
      5
    • Other
      0
    • No Opinion
      4


Recommended Posts

I'm debating on how I want to code a new website that I'm working on. As anyone with HTML experience knows, there are really three ways to accomplish a standard 3 column layout, such as the one used here on OCC and many other sites.

 

The first option is to use tables, like OCC and my own personal site. The code is ugly and complex, but it gets the job done. If someone tries to shrink the browser window down, the site format still holds together pretty good.

 

The next option, which is gaining popularity is to use "div" tags, which is short for divisions. Slashdot.org just moved to this method. This leads to a lot simpler code, but things can get pretty ugly when a user tries to change the browser size.

 

The third "option" which, to be honest, hasn't been a true option since the late 80's is to use frames. This just sucks anyway you look at it.

 

Styling will be done using CSS regardless of how the layout is done.... Tables vs. Div

 

 

Just wanted to get some feedback from others on what they prefer when creating or maybe even viewing a page.

Share this post


Link to post
Share on other sites

tables give you ultimate control imo... nested tables... millions of tables like a fractal made up of tables... that's what you want lol...

 

i've never got anything else to keep the layout exactly right when extending AND reducing beyond/below the intended viewing size with anything else apart from tables...

 

tables... and image slicing... :)

Share this post


Link to post
Share on other sites

Well I don't code websites, but I'll throw in my opinion.

I absolutely hate sites that are coded so they are always 800x600 or something no matter the size of the window. I run a much higher res, so these sites are ridiculously tiny! I guess my vote is for tables as well.

Share this post


Link to post
Share on other sites

Tables have had their run, div has been the new hotness for some time, plus you can layer em to get cool effects and if you're worried about resize distortion just use percentages instead of fixed pixel values

Share this post


Link to post
Share on other sites

Hm... I haven't really looked at sites lately and I'm a loyal follower for tables. I'll have to look up Div's and see how they work, advantages and disadvantages, but I'm a table person. Yeah it may get confusing but how are you coding? For me I'll code it with a program, Evrosft 1stPage and it has a cool table feature which is really easy, then I just add comments so I know which table is what and it makes it soooooo mcuh easier. But from the above post, it looks like I need to look into Div's...

Share this post


Link to post
Share on other sites

Tables are the easy route to go, that's for damn sure. I've been playing around with div tags and CSS formatting for the last couple of days, and things are finally starting to take shape (pardon teh pun).

 

I'm still not 100% convinced I'll use divs. Going to have to do a bit of cross browser testing. IE5 tends to screw everything up. :lol:

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Use divs.

 

For starters.

 

Tables were never designed to be used for a method of design, they were designed for statisticle data, usually out of a database.

 

Tabels are inflexible, in the end of the day, require more coding and tags than the DIV and SPAN tags.

 

The problem you mentioned with DIV's and resizing windows is in my opinion nonsence. Of all the sites i have designed (for my own personnal use and now in my job for the Police Force's Intranet) I scale my layouts so they fit nicley, no matter what the window width is.

 

I believe dropping tables for DIV's would be the best thing you do for website design and layout. There are not really many major cross browser issues to do with using DIV's for design, apart from a few missfitts here and there. As i have moved on to Possitional CSS, you will be amazed at what can be done with this technology, and how fluid it has become. There are thing i do in PCCS that are impossible to do with the use of tables alone.

 

If you ever do decide to go with PCSS, there is one word of advise i shall give: Make sure you plan your stylesheet and tags at the start of your project. It is a major factor and it wil ltake time, BUT, that said, when you do get your style sheets complete, it is just a matter of knocking out pages with ease.

 

Im not the best of speakers (as you may tell), and im not that great at getting my point across about one method or another, but ill put it this way: Using DIV's can be MORE flexible than using tables with minimal PCCS experiance.

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Use divisions!!!

 

The whole movement towards CSS is a positive one , dont get caught behind!!

 

It loads a whole lot faster, and is a lot more dynamic... theres a few website but i cant remember them... anyway, there was this guy who convinced windows to change over to CSS too, and he had this elaborate presentation, it explained how the loading times a much smaller, the HTML code is much smaller (if i remember it was like 28kb vs. 50kb) and there are a lot less of everything-bad and a lot more of everything-good.

 

CSS is the way to go, down with tables....

 

and on the whole resizing of divs... you can define the width of them in terms of pixels... width: 200px... and then you cant resize it it will ALWAYS be 200px wide.

 

Or, if you want, width: 80%.. a percentage.. its all good. divs = better!

 

As far as IE messing stuff up, i think theres an error with the "margin" tag in IE.. it interperates the "margin" to be a margin on the INSIDE of the picture, while firefox and everything else interperts it as being a margin on the OUTSIDE of the picture, so if you have a 200x200 picture with margin 10, its 190x190 in IE and 200x200 with a border of width 10 in firefox/opera... (i think , im not too sure about this, just something i heard).

 

Other than that, i think all CSS works fine with cross-browser.

Edited by DrAwesomePhD

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...