- This topic has 7 replies, 2 voices, and was last updated 5 years, 2 months ago by
David.
-
AuthorPosts
-
March 12, 2021 at 1:22 am #1692103
Marcel
Please suggest me the best way to insert numbers in circles as icons in GenerateBlocks Headlines, or maybe point me to a website where I can download these icons in SVG format.
For reference, this image is suggestive.
The website address where I found this type of headline is in the Private Information section.Another approach would be to use Unicode HTML entities and try styling them with CSS.
Which solution do you think is the best?
March 12, 2021 at 8:13 am #1692729David
StaffCustomer SupportHi there,
i had a look around and there are actually very few decent circle number SVGs that i could find.
What i would do is this – first add this CSS – it applies on:.entry-content { counter-reset: h2counter; } .numbered { display: flex; align-items: flex-start; } .numbered:before { content: counter(h2counter); counter-increment: h2counter; counter-reset: h3counter; display: flex; flex: 0 0 40px; height: 40px; align-items: center; justify-content: center; margin-right: 0.75em; border-radius: 40px; font-size: 20px; font-weight: 700; background-color: #f00; /* change color of circle */ color: #fff; }Then for each heading you want to add a number beside you can select the block and in Advanced > Additional CSS Class(es) add:
numberedIt should auto-count the headings and display a number on the front end beside each numbered heading.
March 13, 2021 at 3:00 am #1693349Marcel
Thank you very much, David!
The solution offered by you is very useful. The only thing I can’t do is change the color of the number in the circle, even if I add “! Important” at the end. This aspect is not very important, but I still wonder what the cause would be.March 13, 2021 at 8:55 am #1693824David
StaffCustomer SupportCan you share a link to the page where i can see the issue?
March 13, 2021 at 9:34 am #1693881Marcel
I found the trick. I put the color before the background-color in your CSS snippet, and now it is OK.
color: #fff; change color of number*/ background-color: #f00; change color of circle */Thank you very much!
March 13, 2021 at 9:36 am #1693884David
StaffCustomer SupportAah sorry my bad – my CSS is broken.
This line:
background-color: #f00; change color of circle */has a broken comment.
it should be (fixed in code above):
background-color: #f00; /* change color of circle */The broken comment would stop any CSS below it from working.
March 13, 2021 at 9:38 am #1693887Marcel
There is no problem. That’s how we learn.
All the best!March 13, 2021 at 2:09 pm #1694070David
StaffCustomer SupportGlad to be of help.
-
AuthorPosts
- You must be logged in to reply to this topic.