bluephoenix
04-06-2003, 06:15 PM
I'm a big W3C supporter... until their recommendations directly affect the way I do things. lol :)
Okay, here's the deal... The table tag has been stripped of it's align attribute. The CSS specs say to use
table {margin-left: auto; margin-right: auto;}
And even that was burried in a non-related section! Anyway, it works fine and dandy for a parent table but not for a nested table. Anyone know another workaround?
Secondly, the wrap attribute has been stripped from the textarea tag. CSS doesn't address input forms, and that irritates me. They shouldn't strip something unless they address it. Any ideas?
Line 114, column 55: there is no attribute "wrap" (explain...).
<textarea rows="8" cols="42" name="msg" wrap="virtual">
-Tim
brothercake
04-06-2003, 06:49 PM
If you're making a standards-compliant CSS layout you shouldn't be using nested tables; if you are using nested tables you may as well use the align attribute.
Dunno about wrap; I don't think it was ever standard - just a convention that a few browsers adopted.
liorean
04-06-2003, 07:01 PM
Tables are one of the areas that are hard to standardise, because there was no clear rendering standard in HTML4. In fact, the only standard that really exist is the IE rendering model (all browsers try to emulate it), but that rendering goes against the specs.
HTML4 deprecated most of the presentational elements and attributes, and XHTML removed the presentational elements/attributes trying to emphasise on it's intended structural nature. Stylesheets adds a presentational layer to the structure, but they aren't intended to be a feature-for-feature match to HTML presentational notions. And CSS is just one of many current or possible stylesheet languages.
Enough of my explanation of why the situation is as it is. Here's some on your specific problems:
Align was severely overloaded in html - it had several possible meanings. It could be vertical positioning relative to the text, horizontal positioning within an element, and horizontal positioning of an element. In other words, messy.
CSS instead have three clearly defined ways of aligning: box model (margin, padding, border, widht, height and float), text-align (for setting alignment of INLINE content within a block), vertical-align (for vertical alignment of content within a table cell - slightly different meaning for non-table elements).
Those are, appropriately enough, explained in box model, text, visual formatting and table parts of the css specs, since most of them apply to any element, not only table elements.
As for wrap attribute, it never existed in html. Some browsers may have added it to their own implementation, but it never existed in the specs.
If you find something that doesn't work where it should rapport the bug to the browser vendor. (Just as a side note, most browsers apply text-align to both inline and block content. try using that.)
And to end this: XML/HTML is intended to explain the structure of the data/contents. Stylesheets like CSS are intended to explain how to render said structure. There's really NOTHING in the xhtml/html dtds that say how anything should be rendered. CSS is, however, not made solely to replace the html presentational elements - it's made to be an overall presentational language. Because of that, they may sometimes force you to rethink your design.
Do you really need nested tables? Tables are made for tabular data, not for being a positional system, and a table seldom belongs inside tabular data. There is a message in the transition from a combined structure/presentation language to one purely structural and one purely presentational - code not for the law, but for the intention of the law. Don't break the semantics more than necessary. Don't mess with structure to achieve presentation if it can be avoided. Don't expect every browser to display anything in letter-perfect exact copies of the way other browsers display it - code instead in such a way that the difference doesn't harm your design. (And a tip, don't use IE as your this-is-how-it's-intended-to-display model. IE is tweakier than most of the others.)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.