Hello,
I have found recommended solution:
ol {
counter-reset: item;
}
ol li {
display: block;
position: relative;
}
ol li:before {
content: counters(item, ".")".";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
}
It works but... very big BUT... it breaks confluence pages on many places:
1) broken breadcrumbs navigation
2) broken comments
Can you propose any solution for default behavior (not based on writing special macro for nested number list)?
Thanx a lot in advance for any suggestions
David csikkel
I think the issue is that you CSS rules apply to all nested lists, which can impact a lot of menu items. You need to restrict your CSS to apply only to your content, which inside a container with class .wiki-content.
So for example, your rules should be:
.wiki-content ol {
counter-reset: item;
}
.wiki-content ol li {
display: block;
position: relative;
}
.wiki-content ol li:before {
content: counters(item, ".")".";
counter-increment: item;
position: absolute;
margin-right: 100%;
right: 10px; /* space between number and text */
}
You may have to play with the selectors a bit (like .wiki-content ol > li
), maybe make the rule for li without the ol, for example:
.wiki-content li {
display: block;
position: relative;
}
The point is to make the CSS more focused.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.