Sent by Zoe M. Gillenwater on 6 September 2006 18:06
Norgren Mats wrote:
> I do not know if this is a question for this forum, but I try.
> (Correct me if the question is not suited for this forum)
If you're ever unsure whether your post is appropriate, please ask the
moderators at [EMAIL-REMOVED] first.
> I am interested in any examples of web sites (well-known, perhaps
> public) that uses xhtml for structuring of the information and css for
> design, BUT NO divs or other elements in the xhtml documents that is
> added just for the purpose of design?
Well, divs have no semantic meaning, so *any* div that you add to a page
is for the purpose of design, really. There's no such thing as a
semantic div, in the strict sense. But, I doubt you are looking for
examples of sites that use neither tables nor divs, as that would be a
pretty plain page. So I'm guessing you are looking for pages that
structure the chunks of information on the page into divs with
meaningful ids (which are nevertheless just there for style) and don't
nest divs? It's impossible to know where you personally draw the line
between a "structural" div and a "style" div. So, I suggest you start
looking at the source code of sites you like yourself, and make the
judgment call yourself. The sites featured on the CSS galleries may be a
good place to start:
> When designing the structure of the xhtml document, I first
> design/structure the document according to what is intended to be on the
> web page (information and functionality).
> Then I, to some extent, add css to make it look just like the designers
> want it to look like.
> But, for some reason, it always ends up with adding some extra divs or
> other elements into the code, just for the purpose of having it look
> exactly like the designer wanted it to look like.
This is unavoidable, if you want to have anything more than one long
column of content. You're going to have to add at least a few divs. Divs
for header, content, nav, and footer are in general the bare minimum. I
personally don't get upset over a couple wrapper divs either. The code
is still extremely lean and clean this way.
> The web page validates at w3c, for sure, but it is annoying with these
> extra lines of codes. I want the xhtml documents to be totally free from
> design, all the way!
Then prepare for some boring pages! Or add a couple bytes and a couple
divs and get some beauty. :-)
> I have looked att css-zen-garden, and that is a cool site, but I want to
> know other web sites that has the same sort of purity in separating code
> from design.
As David said, this is pretty confusing, as this is an example of very
complicated markup. Obviously, you have some internal line in your head
of what are good divs and what are bad divs, and we can't know what that
is. So again, you'll have to investigate for yourself. It will be a good
learning exercise looking at all that source code, I'm sure.
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/