On Feb 10, 11:30 am, John Joyce <dangerwillrobinsondan... / gmail.com>
wrote:
> On Feb 8, 2008, at 9:14 PM, Trans wrote:
>
>
>
>
>
> > On Feb 8, 2:20 pm, Dan Yoder <d... / zeraweb.com> wrote:
> >>> But according to
> >>>  http://validator.w3.org/check?verbose=1&uri=http%3A%2F%
> >>> 2Fwww.rubywaves.com%2F
> >>> you should avoid /> in HTML 4.01 strict.
>
> >> are there any browsers that actually interpret /> per the spec? i've
> >> always just ignored that.
>
> >> it appears the underlying problem is related to the way some versions
> >> of firefox calculate the offset dimensions of block elements. the way
> >> it is laying out the page suggests that it doesn't think it has
> >> enough room to put the main content and the sidebar side-by-side.
> >> although ie6, opera, safari, and mac / windows ff2 don't agree.
>
> >> anyway. i will take this off-line since it has nothing to do with
> >> ruby.
>
> >> thanks again for everyone's help and suggestions.
>
> > one suggestion... use tables and forget about it. all the drivel about
> > the superiority of divs mean squat in the face of practical realities.
>
> > T.
>
> Well, I'd like to add to that. The argument against tables is often
> an irrational one, but not completely.
> The idea, is that using semantic divs for layouts is more flexible
> and more accessible (for screen readers and such)
> Tables are more brittle and make the code itself harder to read.

No way are they are more brittle --it's divs that are more brittle.
I've seen many a site screwed-up because of messed up divs. To me divs
are beneficial in some of the ways you mention, but they were designed
rather poorly I think. It boggles my mind that it effectively pushes
us back to using absolute sizes all over the place --and then we end
up with things like Blueprint --one monstrosity on top of another. Do
developers like torture or what?

> Tables on the other hand, are certainly easier to do layouts with,
> but there are plenty of raw recipes out there using CSS to create div
> based  layouts.
> Tables are appropriate when the CDATA (character data) makes sense as
> a table.
> All of that is just suggestions anyway. Ultimately you can do
> whatever you like that works.
> You could use spans and make them display:block; in CSS.

You have to measure ROI. You can spend a whole day getting divs
working the way you want. Just spend 10 minutes making it a table. And
it can be worse. Case in point, Waves' site has been broken for a week
now. Just use tables and get it fixed --you can always come back and
redo it with divs when you have the time.

> You can avoid CSS altogether and just use HTML containing all of the
> presentational markup, but it's tougher to maintain.

Well that's silly. Declarative stylization is hugely beneficial
regardless of whether you use divs or tables for layout.

> The biggest problem with tables for layout is that people are often
> trying to approximate print document layouts that are fixed and
> controlled, but the reality with html is that you must be flexible
> and accept the fact that different user-agents (browsers) will render
> things differently and that users can resize text in most browsers
> and that they all have different possible screen sizes/window sizes.
> The main philosophy of div based layouts is that you should give up
> trying to exercise complete control of the presentation of the
> document in html.
>
> Tables will do hideous things when designed for one platform in pixel-
> based sizes...

Why would you do that? You can size your table in % not px.

T.