Archived topic
list indent css
3 replies · Started by nomadiceman on August 9, 2021
I want to remove the indent from the bullet list. But the sub list still be indented
How can I do this?
You see on the site linked that there’s an indent. Which I guess is standard in the theme.
I just want it shifted to the left. Aligned
Struggling to get it
Hi there,
try adding this CSS:
.entry-content li > ol,
.entry-content li > ul {
margin-left: 0;
}
Hmmm that didn’t work. I tweaked it and this seems to work
.entry-content ol,
.entry-content ul {
margin-left: 0px;
padding-left: 20px;
}
I’ve never seen > in css before. I wonder why it didn’t work. Could it be that?
Hi there,
It's likely a typo. David likely meant this:
.entry-content ol > li,
.entry-content ul > li {
margin-left: 0;
}
But that's only for removing the indent directly on the list items.
Your CSS seems to be more appropriate as the margin seems to have been applied on the actual parent element (ul and ol), rather then li items.
Is this fully sorted it out? Let us know if you need further help with this.