Skip navigation
Currently Being Moderated

Table Cell Alignment centers content even though set to Top

Sep 21, 2010 8:42 AM

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

 
Replies
  • Currently Being Moderated
    Sep 21, 2010 9:17 AM   in reply to LPMichael

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2010 12:53 PM   in reply to LPMichael

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 28, 2010 2:49 PM   in reply to LPMichael

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 8, 2010 11:31 AM   in reply to Peter Grainge

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2010 11:13 AM   in reply to hemtya

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2010 11:48 AM   in reply to Peter Grainge

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2010 11:53 AM   in reply to LPMichael

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2010 11:55 AM   in reply to Peter Grainge

    Thanks Peter. Let me try this.

    Hemtya

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 11, 2010 12:13 PM   in reply to hemtya

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 6:23 AM   in reply to Peter Grainge

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 6:38 AM   in reply to imagineimage1

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 7:08 AM   in reply to LPMichael

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 7:22 AM   in reply to imagineimage1

    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.

     


     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 7:39 AM   in reply to imagineimage1

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 9:56 AM   in reply to Willam van Weelden

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points