Forum How do I...?

pseudo element content in bookmarks?

dsusco
I'm using pseudo elements to add section numbering to my headers:

h1:before {
counter-increment: h1;
content: counter(h1) '.0 ';
}

So in a browser and PDF I see:

1.0 Lorem Ipsum

However, when I click on the bookmarks sidebar in Adobe Acrobat all I see is "Lorem Ipsum". I'd like the generated content to be in there as well ("1.0 Lorem Ipsum"). Is this possible?

I also tried adding an empty span to my h1 and setting its content to what I want. That didn't work in the bookmarks either.
mikeday
You will need to use the bookmark-label property and add the counter there as well.
dsusco
Awesome, thanks. Everything just clicked with the counters/strings/pseudos.