Skip to main content
Spectrum Writing
Inspiring
February 16, 2020
Question

Adjusting the alignment of text in a table cell

  • February 16, 2020
  • 5 replies
  • 624 views

I have a borderless two column table that is set to auto adjust based on the cell's contents. In the left column, I have an image. In the right column, I have text. By default, the text is being aligned vertically in the middle of the table cell. I want to align the text at the TOP of the table cell. What property must I adjust to make this happen? I have attached a picture that shows where the text is currently displayed in the table cell and an arrow showing that I want it at the top of the cell.

 

TIA,

 

TVB

This topic has been closed for replies.

5 replies

Spectrum Writing
Inspiring
February 20, 2020

Thank you Peter and Amber. This info. helped get me where I needed to be.

Peter Grainge
Community Expert
Community Expert
February 17, 2020

I too was puzzled but here's the answer.

 

https://community.adobe.com/t5/robohelp/where-do-i-find-vertical-text-alignment-in-table-cells-in-robohelp-2019/td-p/10852995?page=1

 

It seems you edit the table style in RoboHelp's stylesheet editor.

 

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 17, 2020

Hmm, I can't see anywhere you can set that inline (the General panel applies styles inline).

 

If you want all tables to have the cells aligned to the top, you can quickly create a base table style which will set all cells to align to the top for every table you add. Otherwise if this is a one-off table, as a workaround, you'll need to switch to code view to manually apply the styling in the code for each cell.

 

You can raise issues here: https://tracker.adobe.com

 

If you want to create/edit the style, here are the instructions, in case you aren't that familiar with CSS and the New UI. 

Check if you already have a base table style defined

  1. Open your stylesheet.
  2. If the Table Styles section has a chevron, click it to open the list of defined table styles. Otherwise go to To add a basetable style.
  3. If one of the styles just says 'table' click that style. Ignore any styles with the naming convention like table.mytable, table.blue, etc.
  4. Expand the Cells section and select the 'Top' icon under Vertical Alignment. Don't change anything else, unless you want that change to apply to every table you create.

 

To add a base table style:

  1. Right-click on Table Styles and select New Style.
  2. Check that the Tag field displays 'table', then click Done without making any other changes.
  3. Expand the Cells section and select the 'Top' icon under Vertical Alignment. Don't change anything else, unless you want that change to apply to every table you create.

 

This is the style you either need to edit or create, and the section you need to modify:

 

 

If you want to manually update the code for just this table, you'll need to switch to code view and add vertical-align: top; into the code. If there's already inline styling, add it into the style="" bit, otherwise you'll need to add style="" yourself.

 

You'll end up with something like this if you don't have any other inline styling:

<td style="vertical-align:top;">test</td>

 

or for a more complex example:

<td style="font-family:Tahoma,sans-serif; font-size: 24pt; color:#453565; vertical-align:top;">test</td>

 

 

Spectrum Writing
Inspiring
February 17, 2020

Hi Amber,

I do not have a Table Style defined. I am using the quick and dirty Insert Table option from the toolbar. Where do I define a table style so that I can make this edit? 

 

Thank you!

 

TVB

Community Expert
February 17, 2020

Assuming you have a table style defined, open your stylesheet, click on the table style you're using and look in the Cells dropdown section. You'll probably find the Vertical Alignment is set to Centre.