Question: Identation based on first child, how?


I have a specification document in HTML where each sub-part uses the next
smallest heading than the last, a standard form I believe. Each subpart is
its own DIVision, (child of the body element), with the heading and a
number of paragraphs. I want to have it so each level of sub-part was
subtly more indented than its parent, and use CSS to do it.

I was trying to figure out a way to indent a division bassed on what the
first tag inside it was, i.e. if the first tah was <h1> no indent, <h2> 
2 pixels and so on, but I couldn't get it to work. As far as I can
see it would either be the oposite of the > selector in CSS2 (< ?) or
mabe the oposite of the + selector also in CSS2 (- ?), but I cannot find a
way to perform the exact formatting I require.

Is there a simple way to achieve this style of formating, or a subtly more
complex one, or will I have to restructure my documents, which are quite
lengthy and I don't really want to have to change.

All help appreciated...

Alix Pexton...

   ----------------~~~~ Alix Pexton ~~~~--------------
   --------~~~ ~~~--------
   ---~~ ~~---
   "If you are falling off a mountain, you may as well
try to fly, after all, you have nothing to loose" JJS(JMS)

Received on Monday, 15 March 1999 06:10:24 UTC