Sent by Mark Newhouse on 10 July 2002 12:12
Before addressing Adam's comments, I wanted to publicly thank Owen and Simon
for their feedback.
on 7/10/02 7:52 AM, Adam Kuehn at [EMAIL-REMOVED] wrote:
> Is there a reason why you have separated the markup into one
> paragraph, a list, then a second paragraph? Structurally, this is
> just a list *inside* a paragraph. Why not mark it up that way? You
> need to keep the outer paragraph as display: inline, but otherwise
> the styles stay the same. It looks identical in NN6.2 and IE5.1 for
> Mac.
You are, of course, correct. And, in fact, that is how I originally
envisioned the mark-up.
> Anyone see a problem with the simpler markup?
<answer style="length: short-and-to-the-point;">
It is invalid XHTML.
</answer>
<answer style="length: long-and-drawn-out;">
I thought that making the UL display: inline; would appease the validator,
but it didn't. Reflecting further I think I understand why. ULs have their
own, separate display style (to enable the markers - bullets and numbering -
to stay attached to the list items, but hang outside the LI's boxes). But
even if they were strictly block level elements, just changing the way they
are displayed doesn't change that fact.
Let me take a different tack. Changing the paragraph to display: inline;
doesn't make it an inline element. It is still a block level element; we are
just telling the browser to display it as if it were an inline element.
So, paragraphs can only contain text and inline elements. Lists are not
inline elements (even when displayed as inline elements, they are still list
elements), so they don't properly belong inside a paragraph.
Now, DIVs can contain anything. We could mark it up as a DIV with a list
inside of it. But my whole idea was to add structure to a list that might
otherwise not be seen in the document structure as a list. Taking the text
out of a paragraph and putting it in a DIV removes the structure of the
paragraph from the document. So it's six of one, half a dozen of the other,
I guess. The P UL P compromise seemed best to me.
</answer>
Best,
--Mark Newhouse
We put the "blah" in blog...
<http://homepage.mac.com/iblog/>