- This topic has 7 replies, 2 voices, and was last updated 3 years, 10 months ago by
David.
-
AuthorPosts
-
March 22, 2019 at 9:31 am #846734
Nacho
Hello,
How can I style the numbered lists like the image below?
I´ve been playing a bit with the CSS and the “before” but nothing.
Thanks a lot for your help.
GeneratePress 2.2.2GP Premium 1.7.8March 22, 2019 at 9:41 am #846745David
StaffCustomer SupportHi there,
try this:
ol { list-style: none !important; counter-reset: item; margin-left: 0 !important; } ol li { counter-increment: item; margin-bottom: 5px; } ol li:before { margin-right: 10px; content: counter(item); background: #bbb; border-radius: 100%; color: white; width: 1.2em; line-height: 1.2em; padding: 2px; text-align: center; display: inline-block; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 22, 2019 at 10:01 am #846770Nacho
Wow,
That worked like charm and super fast.
Thanks a lot David and have a nice day.
March 22, 2019 at 10:04 am #846776David
StaffCustomer SupportGlad to be of help
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 21, 2019 at 6:14 am #906562Nacho
Hi David,
I´ve just found that the first line has padding but not the second and the ones below them so they look like in a box.
You can see in the URL of this post.
Thanks a lot.
May 21, 2019 at 7:42 am #906796David
StaffCustomer SupportLooks like you made some changes to the CSS, so update it to this:
ol { list-style: none !important; counter-reset: item; margin-left: 0 !important; } ol li { counter-increment: item; margin-bottom: 5px; position: relative; margin-left: 40px; } ol li:before { margin-right: 10px; content: counter(item); border-radius: 50%; border-top-color: rgb(212, 212, 212); border-top-style: solid; border-top-width: 1px; border-right-color: rgb(212, 212, 212); border-right-style: solid; border-right-width: 1px; border-bottom-color: rgb(212, 212, 212); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(212, 212, 212); border-left-style: solid; border-left-width: 1px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #bbb; width: 1.2em; line-height: 1.2em; padding: 2px; text-align: center; position: absolute; left: -40px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 21, 2019 at 8:27 am #906843Nacho
Hi David,
That worked perfectly.
Thanks a lot for such a quick reply.
Have a nice day.
May 21, 2019 at 8:46 am #906889David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.