[dokuwiki] Re: Leaner HTML Markup

  • From: fantasai <fantasai.lists@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 07 May 2008 10:59:09 -0700

Michael Klier wrote:

The two losses of functionality above are:
  - ID targetting doesn't work in older browsers (NS4 and below)
    An alternative would be to keep the anchor on the heading.
  - Can't style the list marker differently, would have to use
    list-style-image for the blue boxes. An alternative would be
    to add back an unclassed <div> and style it with li > div.

Not quite, removing the anchor link from the header will render the TOC
useless as well.

How would it render the TOC useless?

Additional functionality given by the better section structure
is that you can, e.g. put a box around the entire section, or
style it with :target

  :target { border: solid; } /* Put a border around the section
                                when it is our link target */

You can have "boxed content" by using a plugin like divspan, or box. I know
that would add another div, so it's maybe not what you would prefer ;-).

I'm not looking for boxes per se, just a way of addressing the section
as a whole--including its header, which I consider to belong to the
section.

(If sections are indented, outdenting the section header can be
done with negative margins.)

I generally don't like negative margins, I see them rather as a hack than
propper CSS. Also browsers tend to interpret margin values not 100% equally.

I can understand that.

Among that I think it's semantically more correct to use:

    headline
    div+indent level
    paragraph

instead of:
div+indent level
    headline + negative indent level
    paragraph

The W3C HTML and XHTML working groups seem to disagree:
  http://www.w3.org/TR/xhtml2/mod-structural.html#sec_8.8.
  http://www.w3.org/TR/html5/#headings

~fantasai

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: