• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Table Cell Alignment centers content even though set to Top

New Here ,
Sep 21, 2010 Sep 21, 2010

Copy link to clipboard

Copied

I found another topic on this posted in May http://forums.adobe.com/message/1976717#1976717

I am working in RH 8 and generating WebHelp

I have a lot of tables in various topics in my project.

Up until yesterday, the tables were working fine.

Yesterday, the table alignment for new tables started acting odd.

They all vertically align content in tables to the center even though the alignment is set for top.

This happens for tables in new topics and if I add a table into an existing topic (where table content is aligned correctly).

The response on the linked posting above was that it is a bug in RH 8 and does not affect the compiled help.

In my project, the source view looks fine (aligned to TOP), but when displayed in the Preview Topic view the alignment is center.

So, after seeing the post above, I generated the help and the vertical alignment still shows centered in compiled WebHelp.

I also generated HTML help to see if this is a WebHelp issue and the vertical alignment still shows centered in compiled HTML help.

I copied one of the tables from a prior topic that is aligned correctly into one of my new topics from yesterday and the alignment is fine for that table.

I checked the Header code in HTML and there is no table related code.

I checked the HTML code for the table and it has vertical-align: top.

Does anyone have any other thoughts on how to research this problem or what the actual problem is?

As a workaround right now, I am copying an existing table from an existing topic that is aligned correctly and so far it is working.

As always - thanks for any assistance.

Michael F Weart

TOPICS
Classic

Views

4.9K

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
Advisor ,
Sep 21, 2010 Sep 21, 2010

Copy link to clipboard

Copied

It's likely that there's a character or paragraph style associated with the text that is overriding (or ignoring) the table cell settings. These styles could be in your style sheet or in the topic.

Good luck,

Leon

Votes

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 ,
Sep 21, 2010 Sep 21, 2010

Copy link to clipboard

Copied

There were no "rogue" HTML code or formatting issues, but...

I noticed that when I click the option to Insert Table, there was a TableSetupTest table style that appeared in my Available Table Styles. I do not remember defining one, but it was there. I accessed Format->Styles and selected Table Styles and deleted the TableSetupTest and the problem was solved.

I was not selecting that table style when I did the Table->Insert Table - I was selecting the (default) style in the Available Table Style list.

Not sure what happened or why there was a table style (I must have set this up at some point) but removing that table style eliminated the problem and now the vertical alignment works as it should.

Thanks --

Michael F Weart

Votes

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 ,
Sep 28, 2010 Sep 28, 2010

Copy link to clipboard

Copied

It is happening again - even when I copy a table setup that is working correctly. I can see no formatting overrides that would cause this problem, but maybe I am not really seeing the formatting that may be in place to override.

What type of paragraph or character formatting I would find in the HTML code?


Thanks --

Michael F Weart

Votes

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
Advisor ,
Sep 28, 2010 Sep 28, 2010

Copy link to clipboard

Copied

Something is in either a style sheet or in your topics (or a master page).

The culprit will be either of these:

In the HTM topics:
     valign=middle

In the CSS (either the external style sheet or in a <style> section in the <head> section:
     vertical-align:middle;

Search everywhere on those text strings. You might also check the .htmtable templates in the Gallery folder (if you have any user-defined templates in there; all the system-provided files will all be dated the same).

Good luck,

Leon

Votes

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 ,
Sep 28, 2010 Sep 28, 2010

Copy link to clipboard

Copied

Looked and found nothing like that in my HTML code.

I did find something that seems to have fixed the problem.

(1) I select the table

(2) I access the Table Style dialog

(3) I check the "Clean Inline Formatting"

(4) That then resets the vertical alignment for the table to "Center"

(5) I then define the vertical alignment to "Top"

(6) Alignment is now to Top

Seems like this reinforces the idea that there is some overriding formatting that forces the vertical alignment to Center even though the table has it defined as Top. So, I have not researched this setting, but does anyone know the design of this functionality?

Again, thanks to all for any direction.

Michael F Weart

Votes

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
Community Expert ,
Sep 28, 2010 Sep 28, 2010

Copy link to clipboard

Copied

I'm not sure but I think clearing the formatting resulted in the HTML default (centre) applying  until you apply something else.

What you have done is apply Top to a specific table. If you locate the TD definition in your CSS and add vertical alignment as below, it will affect all tables except those where you apply something else in line. If you don't find a TD definition, just add what is below. Place it before any other table styles in the CSS.

TD {
     vertical-align: top;
}


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

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

Votes

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 ,
Oct 08, 2010 Oct 08, 2010

Copy link to clipboard

Copied

Peter,

I have a table with 5 columns and I want the contents of the 2nd and the 4th columns to be center aligned.

I tried assigning center alignment to the even columns, but RH CSS Styles editor wouldn't take the setting.

Is this possible and if yes, how?

Appreciate your help.

Hemtya

Votes

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
Community Expert ,
Oct 11, 2010 Oct 11, 2010

Copy link to clipboard

Copied

I just edited a table to set even columns to being centre aligned. I just selected even columns and set Align to Centre.

You are doing that but the content isn't centre aligned?


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

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

Votes

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 ,
Oct 11, 2010 Oct 11, 2010

Copy link to clipboard

Copied

I am setting the Alignment for the table to Top (both in the right click menu and again in the Cells tab of the Table Properties dialog). No matter what I do, the application is totally ignoring the setting for Vertical Alignment - Top (everything is getting centered vertically). Even after the build, when I look at all the vertical align settings it shows Top but the application is not using it.

I have no rogue formatting for tables anywhere in the topic.

I do have some tables that were put in the project early on that are working. I copy that table into a new topic and start with that table and it seems to be working.

Michael Weart

Technical Publications Manager

Direct (415) 536-3509

Fax (415) 644-0591

mweart@corelogic.com

188 The Embarcadero, 3rd Floor

San Francisco, CA 94105

Votes

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
Community Expert ,
Oct 11, 2010 Oct 11, 2010

Copy link to clipboard

Copied

I just looked at your previous post to mine and was thinking of horizontal alignment whereas your earlier posts do specify vertical alignment.

So starting again I created one table using Insert Table, picking Simple Grid Black and inserting a 3 column table. Then I selected the columns in turn setting them to Top, Center and Bottom. It was correct in Design Editor, Preview and Output.

I did the same inserting a table using the Table icon and that too was good.

Try creating a new project and create one topic using the default.css and another topic using your CSS. See how that behaves.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

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

Votes

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 ,
Oct 11, 2010 Oct 11, 2010

Copy link to clipboard

Copied

Thanks Peter. Let me try this.

Hemtya

Votes

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
Community Expert ,
Oct 11, 2010 Oct 11, 2010

Copy link to clipboard

Copied

The table editor does not allow you to define vertical alignment so anything you see in the CSS is horizontal alignment, unless of course you are manually editing the CSS.

Please let's all be careful to specify vertical and horizontal alignment as centre is common to both.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

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

Votes

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 ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

Hey Peter, Terry here from numerous contacts with you.. this table issue is true; I am experiencing the same problem and the only workaround I can find is to manually place the vertical code in each cell; applying the code to the entire table is being ignored.  Also bear in mind, I am now outputting to Microsoft HXS as the final product the customer will be viewing and you can update your contact information for me to terrycabak at maximus dot com

I will let this post know if I find a resolution, as it appears to be nothing to do with the any .css or master page or anything else, though logically you would think that would be the case.  I will also try setting the styles to nothing or normal in the table.

brb

Votes

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 ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

Hi brb,

Try adding this to the CSS in whatever scope (specific row or column, or all cells) applicable. The following applies for all cells.

table.<yourTable> td {

                vertical-align: top;

}

Best,

Hema

Votes

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 ,
Oct 11, 2010 Oct 11, 2010

Copy link to clipboard

Copied

I am doing the same in the CSS and it is not working.

This is what I did. I assigned different styles for "Even Columns" in the CSS editor. This identified the columns in the CSS. I edited the CSS to set the text alignment to Center. Like this...

table.DataTable td.t1Col {
    text-align: center;
}
table.DataTable td.t2Col {
    text-align: center;
}

I thought this would display the even columns center-aligned in all the tables, but it did not. It displays the colums as is, meaning if it left aligned, it displays as is.

There are some 200 tables and I do not want to correct them all manually.

Is this setting possible?

Hemtya

Votes

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 ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

It would appear that this issue is not resolvable unless the align code is placed in each cell of each table.  I will attempt a new project and see if that is true.

Creating a new project with the default table resulted in it working for align to top but the align to top button in the RH interface placed the code in each cell that was selected with the cursor then I clicked the toolbar selection for align top; this inserted the code in each cell.

Correction.  The align top button appears to be malfunctioning and is NOT placing the code at all, even in new tables.

After looking at the code then flipping back to preview then clicking the button after selecting cells, I expect to see the code inserted and this is not happening.

Votes

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 ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

I should have added: edit the CSS outside of RH to add the code. As Peter said, RH editor doesnt help with vertical alignment in tables.


Votes

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
LEGEND ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

Hi,

There must be some code in the way in your project. I've tried new project, inserted a table, selected the table and set the vertical alignment to top. Worked without fault. Can you share an example project where you encounter this problem so I can have a look at what goes wrong?

You can set specific columns to vertical alignment in your css directly, but it's kind of messy (using + selector) or uses CSS3 (:nth-child) that IE8 and below doesn't get. A better solution: Look in the style editor in 'Repeatable columns'. If you define enough columns for your table, you should be able to get exactly what you want. You can set specific format for any number of colums. Just add styling for the columns with the special makeup.

Greet,

Willam

Votes

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 ,
Apr 04, 2012 Apr 04, 2012

Copy link to clipboard

Copied

LATEST

Agree; resolved.  After editing CSS outside RH for adding that line to the code of all the table styles I could find in the css, situation seems to have resolved itself but it appears to have nothing to do with where the code was added.  E.g., once the code was added the button started working properly, or, there was some other glitch in the system because as I clicked the align top button and went back to look at the code, the html code did NOT change as I clicked the button.  Then, it did.  Makes no sense but the fact is it IS working now.

Votes

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
Download Adobe RoboHelp