Skip to main content
Participant
December 11, 2018
Question

How can you change default indent in RH2019?

  • December 11, 2018
  • 3 replies
  • 1547 views

I am starting a new project in RH2019 (after several years away from RH) and am curious if there is a way to change the default indent on the paragraph indent?

When I click "increase indent" from the General properties panel, it inserts the following in-line style:

style="margin-left: 40px"

Is there a way to define the default margin to be less/more than 40px?

I am asking because, I created my CSS and wanted bulleted/numbered lists to be left aligned with the paragraph text. To create lists that have an indented paragraph in them, instead of creating separate styles for indent levels within multi-level lists, I want to make it easier, and use the built-in indent button. However, to do that, I need to define the in-line indent the indent button creates. (Otherwise, I'll need to use the default list indents to use the indent button).

For example...

This is a paragraph about the list that follows. The following list uses the default list indents, but imagine if the bullets were flush left instead of indented. In that case the paragraph indent would be too much:

  • List item one (created with default bullet style)
  • List item two

Paragraph after list item two (created by removing bullet and using indent)

  • List item three
  • List item four
This topic has been closed for replies.

3 replies

Community Manager
December 15, 2018

Like Peter Grainge wrote, it is about the left padding of the list. You can change that by going into your CSS and then adjust the values with the visual CSS editor:

or by tweaking the CSS in the source code editor:

ul {

  margin-top: 0px;

  margin-bottom: 0px;

  padding: 0px 0px 0px 15px;

}

ol {

  margin-top: 0px;

  margin-bottom: 0px;

  padding: 0px 0px 0px 15px;

}

In my CSS, 15px for padding-left aligns it perfectly with the paragraphs before/after the list.

Regarding the construction of multiple paragraphs as child elements of one list item element: Yes, the approach Ioana_St suggested is the way to go. From an information architecture point of view, this is the cleanest approach, as it clearly separates PCDATA (text + inline elements (like strong or em) from and block-level elements (like <li> and <p>):

<ol>

  <li>

    <p>List item one (created with default bullet style)

  </li>

  <li>

    <p>List item two</p>

    <p>Paragraph after list item two (created by removing bullet and using indent)</p>

  </li>

  <li>

    <p>List item three</p>

  </li>

  <li>

    <p>List item four</p>

  </li>

</ol>

Also, in this construction, you do not need to think about the left indent of the paragraphs within one list item at all, as all paragraphs will have the correct indent automatically. It will then look like this:

  1. List item one (created with default bullet style)

  2. List item two

    Paragraph after list item two (created by removing the bullet and using indent)

  3. List item three

  4. List item four

This is also nicer when it comes to nested lists and makes them better readable and more "stable":

<ol>

  <li>

    <p>List Item 1 (Level 1)</p>

    <ol>

      <li>

        <p>List Item 1 (Level 2)</p>

      </li>

      <li>

        <p>List Item 2 (Level 2)</p>

      </li>

    </ol>

  </li>

  <li>

    <p>List Item 2 (Level 1)</p>

  </li>

</ol>

Let us know if it works for you.

djuliebAuthor
Participant
December 18, 2018

Hi Stefan, It does work. One question though, in order to get the <p> tags after each <li> tag, do I have to manually edit the HTML (in Source mode)? I am not able to insert the <p> tags to lists in Author mode, but maybe I am missing something.

Ioana_St
Inspiring
December 19, 2018

Thanks Ioana_St. I see that works fine in RH 2019 "Classic" - but not in RH 2019, where there doesn't appear to be a "normal" style in the style list despite having a <p> style defined in my CSS.


In the new RH 2019 it seems to just be called "p". This is what it looks like for me, using a new project and default.css.

However, it looks like an additional paragraph is inserted every time you select a list item and apply "p" on it... I'll log a bug when I get to work.

And by the way, I would not recommend going live with RH 2019. It's an unfinished product with a lot of missing features and annoying bugs. Stick with Classic for a few months more, at least.

Peter Grainge
Community Expert
Community Expert
December 12, 2018

Open the CSS in a text editor and find the OL and UL styles.

Add a margin left definition where nn is the number you want.

ol,{

    margin-left: nnpx;  

}

The adding a paragraph style as Ioana has suggested, also the method I have used in the past, will also work and has the advantage it also ensures the font is whatever you want. Without that the user will get the default font defined for their browser which might not be what you want them to see. The correct method would be to add the font definition to the OL and UL definitions as well.

This can also be done using RoboHelp's inbullt CSS editor.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Ioana_St
Inspiring
December 12, 2018

As far as I know, you can't change the behavior of the button.

We edit the HTML manually to get the structure you describe - basically, we make "List item two" and "Paragraph after list item two" part of the same list item.

Initially, we add numbering to the paragraph as well, so the list looks like this (the paragraph is step 3):

<ol>

<li><p>List item one</p></li>

<li><p>List item two</p></li>

<li><p>Paragraph after list item two</p></li>

</ol>

Then we merge the last two lines, by deleting the tags in red, so you get this HTML - two paragraphs inside the same list item:

<ol>

<li><p>List item one</p></li>

<li><p>List item two</p>

<p>Paragraph after list item two</p></li>

</ol>

For this to work, you need those <p> tags on each row. This means that, after you insert a list, you need to add the Normal style to all the items (from the Author view).

But of course, this means that you need to mess with the HTML, which may not be something you want to do. Maybe someone knows of a solution for the visual editor as well.

djuliebAuthor
Participant
December 12, 2018

Thanks. I'll probably go with this approach. I was hoping to take advantage of the UI to make is simpler on those learning/using the tool and on me for CSS maintenance.