$content (which is used by themes, most likely within node.tpl.php, i.e Garland prints it into a DIV with class "content clear-block") renders as this HTML elements:

<div class="content clear-block">
	<!-- Body (NOT wrapped into HTML block!!!) -->  <p>1...</p><p>2...</p><p>3...</p>
	<!-- ImageFields (wrapped in HTML block) --> <div class="field field-type-filefield field-field-imagebogus">...</div>
<div>

My question: The node body content is just a loose sequence of the elements as you entered them in the "Body" field (as text or via WYSYWIG) while node creation/editing. Why is this node body content with all its elements not wrapped within a container, so that you can easily treat them as a whole unit with CSS? Of course I could simply create a wrapping DIV in all my node body's, but there is for sure a much cleaner method. Only, where and how?
What's the default way to do? Ideas I already had: Should those ImageFields be in a separate block or region? Or can $content be printed into just one region, and my intended block separation happen nevertheless?

Intended purpose: I simply want the body content (with all its paragraphs, quotes, possible inline images, etc) to be shown left, and all my ImageField images float as one block on the right side. But with this structure I can at best only float the "imagefield div block" right of the last element of the "node body div block", but not right of the whole "node body div block".

I've searched for documentation about the $content object, what's it composed of, and which Drupal functions, modules, etc interact with it, but as all imaginable keywords associated with it were too general, I found nothing suitable, and Node.tpl.php was too minimal.

Comments

porg’s picture

Thanks to Gabriel Radic, who wrote the module Body Wrapper which solves exactly this problem.
I used the D6 version as provided in the comment by davidwhthomas.
And good news for D7 from Joachim:

This is obsolete on D7 as node body is a field, and hence gets a wrapping DIV with 'field-name-body' among others.