When the list item is a block level (as this one is) you can have a p tag in it.
I see no reason for p tags in this case though. If the problem occurred after you placed the p tags in there it is more than likely some default p margins causing problems. Hard to tell though without all your code, where are the UL styles?
You are entirely correct but I was going on the above example (rather than going by as you mentioned a block level list) as it would be semantically incorrect to use paragraph tags on a list which is clearly being used for an inline navigation list (sorry I wasn’t explicit enough).
I do not see any attempt to cause the ul to enclose its float children. The ul should expand to enclose the list items, including the li’s child p element and its margins, etc.
The <! element li - o %flow* – list item –> in the DTD indicates that the list item may contain zero or more of any element of type “flow”, i.e. any element defined as %block or %inline.
weird, ok. So I removed the <p> and the links fell back into the div. Now you are saying because they <li> are floated, it makes them block level and the <p> tags and content within should be fine and show up inside the div? Well then I guess I still wonder why they are not when I throw back in the <p> tags such as in my example.
Now you are saying because they <li> are floated, it makes them block leveland the <p> tags and content within should be fine and show up inside the div?
Yes, that is what I am saying.
Well then I guessI still wonder why they are not when I throw back in the <p> tags such as in my example.
Probably because you are not containing your floats within the UL, Gary mentioned it in his post also. I have asked to see your UL styles but have I have not seen them yet. The code you posted just gave the li styles.
I suspect that you did not remove the default margins from your p tags, when that is done it works fine. But as I mentioned I see no reason for you to need p tags in this situation when the anchor can style the text. I left the p tag there to show you that it is possible.
Here is a working example with the needed UL styles to contain the floats-