Why Divs when tables work, in all browsers

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

jason wrote:when IE was the browser you loved and Netscape was the horrid abomination
... What? Wasn't Netscape the first to support JavaScript? And CSS? IE was always the lazy one.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

superdezign wrote:... What? Wasn't Netscape the first to support JavaScript? And CSS? IE was always the lazy one.
Netscape 4... I have nightmares. It was just painful.

People who grew up in those days doing table-based designs are pretty resilient to the affects of CSS differences among browsers.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

jason wrote:And the ONLY reason it's harder is because of the browsers.
I think you forget the history. Originally you were supposed to do your layout all the semantic elements plus <div> (no <span> then). The problem was it just didn't work. There were a number of problems, but one of them what that HTML was just not designed to do the kind of layouts that people started doing. It was Adobe and Macromedia that built those incredible <table> based layout editors. Remember when the whole page was sliced up images! Tables just worked

Again, I think my point is that design of <div> still suffers. Good grief, have you all forgotten the slew of articles by guys trying to figure out how to do columns with <divs>'s (the holy grail ;)). Maybe you are used to <div>'s now and all the floating nonsense -- but that does not make it a good design.
(#10850)
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

The point is that there is a learning curve. A big part of that curve is browser-problems (IE). Is that bad design? Don't think so. PHP isn't that easy neither. Maybe there are one or two issues that could have been done differently, but I wouldn't know which.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

arborint wrote:Maybe you are used to <div>'s now and all the floating nonsense -- but that does not make it a good design.
But it DOES make it standardized. ;)

CSS can't become better if it does not have people trying to push the envelope and expose the flaws. CSS is not perfect, just like HTML is not perfect, or PHP is not perfect. But version after version, they find out what the developers need because the developers had to find a way to make it happen. Then, when the next version emerges, they make it better supported.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

One bad browser does not make the purpose of HTML and CSS irrelevant. IE6 (and other variants of IE on different platforms) have made semantic markup with CSS supported styling very difficult. Standard browsers, for the most part, get it right. Not all browsers render the same, regardless of the standard. I have coded pages that render completely different in all four major browsers, so trying to get a site the render exactly the same on all browsers on all platforms is a bit of a pipe dream I imagine.

However, markup is exactly that... markup. Open a text editor (any editor, even Word if you wish, though this is more fun with something like Notepad/gEdit/TextEdit) and write some stuff in it. Then, inside the editor, add style to it, like a heading or red text or a border. Outside of Word processing applications like Word, it is next to impossible becuase the purpose of the editor is to write/display text. Markup is akin to that.

In Word, you can apply styles to a document just like you can to markup. Word manages styles outside of the document, so even though you see it in your Word window, the styles are controlled by underlying style rules. Even if you change the way the page looks in the Window, the underlying document is still the same.

Markup and CSS work the same way. Markup is essentially the text to be presented with some default, minimalistic styles associated with it. Styling the document should be done with Stylesheets as that is the purpose of the Stylesheet. The markup presents the data/text/images to be presented, the stylesheets format it.

Going back to my Word example, has anyone ever used a gigantic series of tables to generate a Word document that was not tabular data? Seems silly, doesn't it?

Using markup to mark up a document just makes sense. Using style to stylize the mark up just makes sense. If it happens that you cannot make a columnar layout using CSS then perhaps it is time to learn a few CSS techniques as opposed to using a markup element out of context.

PS CSS and DIV tags should not be confused with one another. The TABLE vs. DIV debate is, in my opinion, an incorrect debate. I believe the debate here should be TABLE vs. CSS, as there are a whole gang of markup tags that can be styled outside of a simple DIV tag that can handle positioning and the what not.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

First, what I find fascinating and delightful is that this discussion has gone on for four pages with considerable passion and not one trace of "you're an idiot" in it. Speaks to the courtesy and friendliness which is the nature of this group of people.
I like to think of CSS as just bringing the actual programming back to HTML. If there was only one way to do everything when programming, there's a lack of creativity in solutions. CSS is flexible. There are a million and one ways to display things. Floats, absolute / relative positioning, altering the 'display' property, negative margins, overflowing, etc.
I couldn't agree more. I found CSS difficult at first, but the flexibility is porecisely what I enjoy most about using it now. In part, probably, because I have been a programmer back to the days when C was new and desktop computers had not yet been invented.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Everah wrote:Going back to my Word example, has anyone ever used a gigantic series of tables to generate a Word document that was not tabular data? Seems silly, doesn't it?
:lol:
Bill H wrote:First, what I find fascinating and delightful is that this discussion has gone on for four pages with considerable passion and not one trace of "you're an idiot" in it. Speaks to the courtesy and friendliness which is the nature of this group of people.
:-D DevNet ftw. <- Just learned what that meant, yesterday. ^_^
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

Bill H wrote:First, what I find fascinating and delightful is that this discussion has gone on for four pages with considerable passion and not one trace of "you're an idiot" in it.
What?

We haven't?

Well, we have to remedy that right now. :twisted:

Bill...

You're an IDIOT! :wink:
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

STFU N00B! RTFM@W3C! PWN4G3!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Smooth, real smooth. Locked.
Locked