Text Alignment of Text in RH2020.3.32

New Here ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I've read the posts on aligning text in RH 2020.3, but I don't see the alignment options shown in previous posts. On the Table tabl of the Properties panel, my Alignment options are:  

Margaret5FA1_0-1614341485597.png

That's it.  Why don't I see  top, middle, or bottom alignment icons?

Views

64

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Hi Margaret, 

we had that issue some months (and RoboHelp versions) earlier and found a simple solution.

 

Since the vertical alignment is an attribute of the table row (not the whole table), it has to be set for the <tr> tag. The default attribute is "middle", positioning the cell content in the vertical middle of all cells. That looks strange if the neighboring cells contain much more text, so I figure you want the text to always align at the top of a cell.

 

Although there are no specific settings in the Editor's panel this can be done manually in the CSS file. If you want the setting to be the default for all table rows, it's just a simple string. 

 

table tr {
vertical-align: top;
}

 

If you like to handle that behavior depending on the purpose of a table you need to set up different classes for tables. Then change the above string to aim to the classes:

 

table.oneclass tr {
vertical-align: top;
}

 

table.anotherclass tr {
vertical-align: bottom;
}

 

If no class is applied to a table the default 'vertical-align: middle' is still valid.

 

This is how to add the CSS string:

  • Go to the table style you want to change by clicking on the Pencil icon in the panel entry
  • In the CSS Editor, switch to the code view - and take a deep breath... 😉
  • Press Ctrl + F (or activate the Find option via "Edit" -> "Find in Current File" menu)
  • In the Search field at the bottom, search for occurrences of "table"

 

Now it depends on which of the above cases is yours: 

 

If you want to change the default behavior of all tables just add the code block that does the trick at the bottom of the code sheet:

table tr {
vertical-align: top;
}

 

If you like to keep the default alignment for all tables and add a different vertical alignment just for a specific class,  search for all occurrences of "table" until you detect the class which you want to change.

Then add the vertical-align: top; line before the "}" at the end of the style definition.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Thank you! I will give these instructions a try and let you know how it turns out.
--ps

Sent from Mail for Windows 10

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Pressed "Post" too fast, sorry.

 

After the last step, save the changes, switch back to the Author view, and go back to your topic containing the table you wanted to change. Maybe you need to refresh the topic rendering by saving it and/or pressing the topic's tab again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

Hi Margaret,

 

Modifying the CSS will work. Vertical alignment option is there in the CSS editor but was missing from the Properties panel. We have provided that in Update 4. Pasting the screenshot.

 

Capture3.jpg

Thanks,

Vivek

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 01, 2021 Mar 01, 2021

Copy link to clipboard

Copied

Thanks, Vivek! 

Hi-speed answer as always. We're really looking forward to the next update. Any suggestions when it will be available?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

LATEST

Update 4 is now available via Help > Updates.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Please use the Blue reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation