Forum How do I...?

indenting text after printing generated counter

bczifra
How would I be able to add a period and then indent my text after printing a generator counter?

For example, if I have the following XML:
<Name>John Smith</Name>

and CSS:

Name:before {
content: counter(chapter, upper-roman);
margin-left: 1in;
}

Name {
display: block;
float: left;
margin-left: .25in;
}

This will result in "IJohn Smith". However, both the indentation of the content, and the indentation after the counter ("I") are wrong. I would like to be able to get:
"I. John Smith", with a period after the number and where the whole bit has a margin of 1 inch, and then a .25 inch indentation between "I." and "John Smith".

Any ideas?
mikeday
Try this:
Name:before {
content: counter(chapter, upper-roman) ".";
margin-left: 1in;
margin-right: 0.25in
}
bczifra
Thanks, that did the trick.