Skip to main content
Spectrum Writing
Inspiring
January 24, 2020
Question

Changing the formatting and layout of an autonumbered paragraph

  • January 24, 2020
  • 23 replies
  • 508 views

I am wanting to create four paragraph styles in my RH2019 (Version 10) project. Each style is to be autonumbered with text:

 

WARNING

CAUTION

TIP 

NOTE

 

I create a new paragraph style and in the Autonumber pane for the properties, I set the style to None, and the format to the text, for example, WARNING:.

 

When I apply this style to text in a topic, I do indeed get the expected autonumber, and then I can add the appropriate text after the autonumber. However, I want the autonumber to be in bold, and I want to decrease the space between the autonumber and the following text. Where can I adjust these properties for an autonumbered style? Because it is not a List style, but a Paragraph style that I am creating, I do not see these options. I don't want to have to create a List style to be able to accomplish this task, but. . . .

TIA,

 

TVB

This topic has been closed for replies.

23 replies

Peter Grainge
Community Expert
Community Expert
February 13, 2020

Just paying back the support I got when I started.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Spectrum Writing
Inspiring
February 13, 2020

Thank you Amber! That helped a ton and thank you Peter as well for getting me started on this. I don't know what I would do w/out the support of folks like you in this forum.

Community Expert
February 11, 2020

Yes, my explanation was simplified, and margin-right will do the same thing in this case.

 

The box model shows where margin and padding are applied:
https://www.w3schools.com/css/css_boxmodel.asp

 

In many situations the difference doesn't matter, but comes in to play when you set top and bottom margins, which can overlap, causing a narrower gap than intended.

Peter Grainge
Community Expert
Community Expert
February 11, 2020

Except both margin-right and padding-right are doing the same thing in this case. On the w3xchools site it is easy to see the difference when content is in a table, following the links above. With autonumber, it's not so easy.

 

Maybe some experimentation with other margin and padding settings would reveal the difference, if there is one with autonumber.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Community Expert
February 11, 2020

It might help to think of the auto-number setting as splitting the paragraph into two chunks: one chunk for the number and one chunk for the rest of the text. Normally the number chunk is just big enough to fit the number. The padding-right says "actually, I want my number chunk to be bigger, and I want to stick the extra space on the right-hand side".

 

 

Peter Grainge
Community Expert
Community Expert
February 10, 2020

Amber is probably in bed by now. She's in Oz.

 

Change it and you will see. 🙂

 

If you go to the page below you will see an explanation of margins. There is also a test it for yourself button.

https://www.w3schools.com/css/css_margin.asp

 

Immediately below is the same thing for padding. With content within a border, it's easy to see how the two work.

 

In your case, you are working with an Autonumber setting that is valid CSS but it introduces another complication. Both margin and padding impact the gap here so earlier it was in fact the total of the two. When margin was set to zero, the total was just the padding setting.

 

You can comment out any line in CSS by adding /* before it and */ after it. Do that with the padding setting and you will see there is no space at all between the two.

 

That's about as clear as I can make it. 🙂


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Spectrum Writing
Inspiring
February 10, 2020

Thank you Amber, but I will be the first to admit - I am still a relative CSS newbie. What does the right padding setting have to do w/ the gap between the auto-number portion of the tag and the text of the tag?

 

Thank you again,

 

TVB

Community Expert
February 10, 2020

It took me a couple of days of thinking about it to make the connection I admit 🙂

Peter Grainge
Community Expert
Community Expert
February 10, 2020

Thanks Amber, I missed that. Apologies.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Community Expert
February 10, 2020

To remove the extra space, go in to the p.warning::before style and remove the padding-right value. That's why you can't make it any smaller than a certain value.