mikeschinkel at gmail.com
Sun Dec 28 06:17:16 GMT 2008
DD32 <wordpress at dd32.id.au> wrote:
> Secondly, Nested lists, The <ul> -has- to be within a <li> for it to be
valid HTML, It can either be <li><a>...</a><ul class="children" or
<li><a>..</a></li><li><ul class=children> but that causes issues with
numbered lists or for that matter, any list which has any form of bullet or
marker before it..
Ah, good point. I wasn't even thinking about that aspect.
>> Also, A CSS class such as cat-child-xxxxx would be rather pointless, It
describes the content, but does nothing to arrange it visually, and since
it'll be different in every case, its near impossible to rely on it.
Yes, agreed, it is pointless when you think in terms of CSS. However, when
you think in terms of jQuery and it makes a lot more sense. Being able to
inspect the current element to select another element is easier and more
robust than traversing siblings and making potentially assumptions that may
not always be valid. Of course it becomes less important in this context if
the <ul>s stay children of the <li>s.
>> I really cant see a reason why single vs multi line li's is going to make
difference to backgrounds either..
Here again, you had a good point and all because I was doing something
stupid. I was using background-image instead of list-image-style. Why?
Because the code I was writing was actually code I was modifying that
someone else originally wrote. But that's not a good excuse for my
stupidity. Can I instead use the fact I really hate dealing with CSS and
thus don't know it very well as my excuse? :-)
Anyway, thanks for checking my (in hindsight) hasty proposal.
P.S. I guess I can (should) use get_categories() instead to get the list of
categories as an array. It's not structured as I wanted but that shouldn't
be hard to fix.
More information about the wp-hackers