Venu Madhav
Venu Madhav

Reputation: 433

Issue with counter-increment in css

I am facing a problem with css counter-increment, number is not appearing in Output.Please help me. Please explain me clearly.

This is my codepen: codepenenter code here

Upvotes: 0

Views: 88

Answers (2)

currarpickt
currarpickt

Reputation: 2302

"counter(number)" will be detected as string. Just remove the "".

h1:before {
  counter-increment: number;
  content: counter(number);
}

If you want with period after number:

h1:before {
  counter-increment: number;
  content: counter(number) ". ";
}

Upvotes: 2

sinsedrix
sinsedrix

Reputation: 4795

Just remove the quotes around counter(number).

Upvotes: 1

Related Questions