Sent by Paul Eley on 11 December 2004 23:11
Hi everybody -
I'm posting, just to note something that I found was an important
distinction in order for me to understand the nature of CSS.
It's been my experience that CSS is to be used in conjunction with a
consistent but contextually defined data structure. HTML is ONE
consistent and contextually defined data structure. It just so happens
that it came with CSS defaults, which people are trying to tweak to
their hearts content. I firmly believe that the real focus of design
should be BOTH the data structure (aka XML Schema) and CSS that
supports it's presentation.
To illustrate this point, consider that HTML already has all the tools
and elements you probably need to simulate a word processing document.
That's HTML's context, a "word processing document". You can use CSS to
modify certain display properties, but it's already been decided what
those defaults are. It can be a lot of trouble to discover which
property, or combination, that you are trying to overcome for your
particular needs. I'm not saying "don't touch", I'm just saying stop
trying to be "right" and refocus your energies on the time-saving
battle.
In most cases, if you are trying to create an online presentation or
something, try working from scratch...design the data structure first,
using DIV's and then move onto the CSS.
I recommend using DIV's w/class selectors because they are:
1.) Barely formatted text-nodes (generate line-breaks)
2.) Reusable within the same document
3.) Elegantly degrade into Text
4.) Their ability to "contain" can be used to simulate multiple data
objects w/properties within the same document. For example:
<div class="EmailMessage">
<div class="CreatedBy">Sender Goes Here</div>
<div class="Created">Date Sent Here</div>
<div class="Title">Subject Line Goes Here<div>
<div class="Text">Lorem ipsum set dolor ala....</div>
</div>
Above: A Simple "Email Message" data structure, or:
<div class="EmailMessage">
<div class="CreatedBy">Sender Goes Here</div>
<div class="Created">Date Sent Here</div>
<div class="Title">Subject Line Goes Here<div>
<div class="Text">Lorem ipsum set dolor ala....
<!-- The "Attached Email Message? -->
<div class="EmailMessage">
<div class="CreatedBy">Sender Goes Here</div>
<div class="Created">Date Sent Here</div>
<div class="Title">Subject Line Goes Here<div>
<div class="Text">Lorem ipsum set dolor ala....</div>
</div>
</div>
</div>
Above: An email message w/"Attached" message?
Because the above data structure uses Class Selectors, it can be used
multiple times within the same document. The ID attribute could be
reserved for referencing that particular data object within the
document, and then crawling it's "property" nodes. You would have an
easier time defining the CSS for this type of data structure
(contextually defined) than you would forcing HTML to do your bidding.
Also, don't forget the power of IMPLIED Classes.
Keep in mind that since CSS is so open ended and flexible that no one
CSS implementation is going to define how the rest of the world
"styles". HTML's done and perfect for word processing documents! If you
want that kind of power, design a data structure for a different
community's needs along with the accompanying CSS. That's what W3C did
when they created HTML.
I guess what I'm taking the long way around to get at is that
statements like "Always use FLOAT to simulate Table-based columns" are
troublesome because there are million different ways to do the same
thing. A CSS definition shouldn't be evaluated as "good" by it's
success across browsers. It should be determined a "success" if it
accurately visually describes the relationship of the data structure.
In other words, look at the data structure in it's raw ugly HTML
format, and determine what it is trying to say before trying to make it
fit pre-conceived trendy uber-kool notions.
I know I jumped tangents there, but hopefully somebody will find some
value in all of that! :o)
- Paul
--
Paul Eley
Enterprise Systems Developer : Interface Development Lead
Office of the Under Secretary of Defense for Policy (OUSDP)
Usability / Section 508 / CSS Strategies
-------------------------------------------------------------
a: M-F: 9am-5pm EST
o: [EMAIL-REMOVED]
h: [EMAIL-REMOVED]
w: http://homepage.mac.com/pdae1971
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/