WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 2 years ago

#33795 closed defect (bug) (invalid)

Table alignment in WordPress 4.1.7

Reported by: jbrule Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1.6
Component: TinyMCE Keywords: dev-feedback
Focuses: Cc:

Description

We are having issues working with tables that have an alignment set. The table cells are not growing to meet the size of the table they are contained in. It looks like the issue has to do with the .aligncenter{ display:block rule } rule. With that disabled the table displays correctly in the editor.

How to reproduce
# Create a table using the table tool.
# Enter text into each of the cells
# Select the table and go to Edit Table Properties and select "center" alignment.

Attachments (1)

Screen Shot 2015-09-09 at 12.52.33 PM.png (22.7 KB) - added by jbrule 5 years ago.
Image of center aligned table in the TinyMCE editor.

Download all attachments as: .zip

Change History (4)

@jbrule
5 years ago

Image of center aligned table in the TinyMCE editor.

#1 @knutsp
5 years ago

  • Keywords dev-feedback added

I can't find a table tool in plain WordPress visual editor, but a table tool appears after installing TinyMCE Advanced plugin.

That in place I can reproduce this in trunk (4.4-alpha-33955).

Testing the same alignment in the demo at TicyMCE home http://www.tinymce.com/ with TinyMCE 4.2.5 does not produce the problem.

So I really don't know if this should be classified as bug in core, TinyMCE Advanced plugin or upstream TinyMCE.

#2 @jbrule
5 years ago

For the time being I have worked around the issue by adding the following to my theme's editor-style.css file

table.alignleft, table.aligncenter, table.alignright{
        display:table;
}
td.alignleft, td.aligncenter, td.alignright{
        display:table-cell;
}

#3 @antpb
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Summary changed from Table alignment in Wordpress 4.1.7 to Table alignment in WordPress 4.1.7

Agreed with @knutsp from 3 years ago... haha Closing this as invalid as it is not Core WordPress.

Note: See TracTickets for help on using tickets.