Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Nested listed appear to be formatted incorrectly (a) Bulleted lists nested in numbered lists continues to show the numbers (b) Numbered lists in bulleted lists continues to show the bullets (c) In both cases, the nest list shows in a larger font size
How they should appear:
Example 1
- Ordered list one
- Ordered list two
- Ordered list indented:
- Indented Bulleted list one
- Indented Bulleted list two
- Indented Bulleted list three
- Ordered list four
- Ordered list five
Example 2
- Bulleted list one
- Bulleted list two
- Bulleted list indented:
- Numbered list one
- Numbered list two
- Numbered list three
- Bulleted list four
- Bulleted list five
Code:
<p>Example 1</p>
<ol>
<li>Ordered list one</li>
<li>Ordered list two</li>
<li>Ordered list indented:
<ul>
<li>Indented Bulleted list one</li>
<li>Indented Bulleted list two</li>
<li>Indented Bulleted list three</li>
</ul>
</li>
<li>Ordered list four</li>
<li>Ordered list five</li>
</ol>
Example 2
<ul>
<li>Bulleted list one</li>
<li>Bulleted list two</li>
<li>Bulleted list indented:
<ol>
<li>Numbered list one</li>
<li>Numbered list two</li>
<li>Numbered list three</li>
</ol>
</li>
<li>Bulleted list four</li>
<li>Bulleted list five</li>
</ul>
Comments
Comment #1
iantresman CreditAttribution: iantresman commentedAlso, in the Giordani theme, a number list is indented by a different amount to a bulleted list.
Comment #2
William Haller CreditAttribution: William Haller commentedThis same problem also appears in the alagna subtheme of Marinelli.
Comment #3
William Haller CreditAttribution: William Haller commentedThe easiest way to get rid of this is to edit the graphics.css file and comment out the lines as follows
/*#primary .singlepage .node .content ul li,*/
.comment ul li{
/*lists in node content*/
list-style:none;
background:url('../img/leaf.gif') no-repeat 0px 2px;
}
/*#primary .singlepage .node .content ol li{ /*ordered lists in node content*/list-style-type:decimal;}*/
That way, the author can specify their own list types as needed. OL's really shouldn't be forced to decimal at the top level in the style sheet. Of course doing this and allowing the normal bullet points from the browser instead of the background url causes its own CSS issues with some browsers, but the only way around it that I know of is to specify all the orders you think you might hit in individual specifications (ol ol ol, ol ol ul, ol ul ol, etcetera). If somebody has a better way, I'd like to hear it.
Comment #4
iantresman CreditAttribution: iantresman commentedThis is the fix I made. In
sites/all/themes/marinelli/graphics.css
in the section/*lists in content*/
:#primary .singlepage .node .content ul li
I added a new block which fixes nested bulleted lists in ordered numbered lists;#primary .singlepage .node .content ol li{ /*ordered lists in node content*/list-style-type:decimal;}
toI didn't fix the indented lists not indenting by the same amount.
Comment #5
ghede CreditAttribution: ghede commented@iantresman
Just wanted to say thanks, your solution in #4 fixed things nicely. I now have correctly formatted lists!
Best regards,
Jim
Comment #6
tallsimon CreditAttribution: tallsimon commentedalso in nested lists, the text size of the child items gets bigger the more nested the link. is this also the case on other people's sites? is that what the fix above is for? - {font-size: 100%}
Comment #7
tallsimon CreditAttribution: tallsimon commentedoh yes, that is much better. maintainer, please roll in to next verson!
Comment #8
oadaeh CreditAttribution: oadaeh at Flatt and Sons commentedThis issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-4.x branch.
Thank you.