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. 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 can avoid CSS altogether and just use HTML containing all of the presentational markup, but it's tougher to maintain. 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... In the end though, it all comes down to doing what suits you and your target audience. The argument is similar to frameset problems. You can avoid framesets and just use the overflow CSS item to make scrollable sections.