Tables Vs Div For Page Layout CSS All The Way
#1
Posted 23 September 2005 - 07:58 AM
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.
If you enjoy my ramblings you may want to visit my blog, follow me on Twitter, or friend me on Facebook.
#2
Posted 23 September 2005 - 09:26 AM
Main Rig :: Q6600 @ 3.8Ghz :: 2x HD4850 Crossfire :: Asus P5K3 Premium Black Pearl ::
HTPC :: 4850e :: HD2600xt :: Gigabyte GA-MA78GM-S2H :: 1TB Storage ::
Ubuntu Server :: Athlon XP 2500+ :: Radeon 9800xt :: MSI K7N2 ::
OCC Site Rules :: Site Help FAQ :: Extreme Cooling FAQ :: OCC Benchmark Team
#3
Posted 23 September 2005 - 01:47 PM
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...
)i7 920 D0 @ 21x196=4116, HT on · D-Tek Fuzion v1 · 3x2GB Corsair XMS3 PC3-10666 @ DDR1176, 8-8-8-22-1T
BFG/XFX GTX260 Maxcore SLI @ 756/1512/1188 (Swiftech MCW60-R + Swiftech GTX200) · Asus P6T Deluxe V2
X-Fi XtremeMusic (Hotrodded) · PCP&C Silencer 750
Athlon II X4 635 @ 2900 · 2x 2GB PC2-6400 · HD5550 1GB · Asus M4A77D · Antec Neopower 480
EeePC 1000H @ 12x164=1965 · 1x 2GB Corsair VS PC2-5300 · Gigabyte Aircruiser N300 GN-WI06N

#5
Posted 24 September 2005 - 11:42 AM
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.
#6
Posted 24 September 2005 - 11:52 AM
#7
Posted 24 September 2005 - 12:13 PM
XP-120 w/Panaflo | 2 X 36.7Gb Raptors in Raid0 | Audigy 2 ZS w/Logitech Z-640's
1Gb G.Skill DDR550 | Fortron Source 500W PS
-----------------------------------------------------------------------------
17" Macbook Pro | Intel Core 2 Duo 2.4Ghz | 4Gb DDR2 Memory | NVidia 8600M GT
#8
Posted 24 September 2005 - 02:22 PM
Abit NF7-S rev.2 * Antec True 430
thermaltake alx-800 w/ panaflo 80mm M1a fan
msi geforce ti4200
Seagate 160 SATA * Maxtor 80 IDE
#9
Posted 26 September 2005 - 08:53 AM
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.
If you enjoy my ramblings you may want to visit my blog, follow me on Twitter, or friend me on Facebook.
#10
Posted 17 October 2005 - 05:48 AM
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.
#11
Posted 17 October 2005 - 06:10 AM
AC Eheim Pump(1320Lp/H!!)+Enzo Saph revA+MCP320+3X Delta 142CFMs+DD 5 1/4 dual bay res*
Nerm, on Jul 15 2005, 07:56 AM, said:
Verran(RIP Friend), on Jul 27 2005, 07:38 PM, said:
"My other other rig is a ZX6R"
#12
Posted 27 October 2005 - 12:02 PM
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.
This post has been edited by DrAwesomePhD: 27 October 2005 - 12:08 PM


Sign In »
Register Now!
Help






MultiQuote










