[pmwiki-users] question about headings

Ben Wilson dausha at gmail.com
Wed Aug 22 05:58:44 CDT 2007


On 8/21/07, Shi Sherebrin <pmwiki at share-a-brain.com> wrote:
> I'm trying to set up a style for my skin such that the first heading on
> a page won't have any margin above it, but other headings will.

Are we referring to the page title heading, or a section heading?

My approach to web page headings is a bit different than some, but I
recall there's some standard I'm following. Essentially, the page
heading (a.k.a. chapter heading) is the only H1. Each section heading
is an H2. Sub-sections are H3 and paragraphs (sub-paragraphs) are H4
(H5).

I gather from your email that you are probably _not_ referring to the
page heading. You're probably referring to the first section heading.
However, if you are referring to the page heading, then perhaps my
solution would work for you.

I disabled the ability to designate H1 and let the stylesheet handle
the rest. Notice the '2' instead of '1' in the following regex. That
means that "! Chapter heading" is politely ignored. Actually, every
page has two H1s, one for the mast, and another for the title. Which
H1 is which is from context (#page H1 {} v. #mast H1{}).

/^(!{2,6})\\s?(.*)$/e'

-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill



More information about the pmwiki-users mailing list