Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8763 closed Bug (invalid)

Table - column - cell width issue

Reported by: Jos de Nijs Owned by:
Priority: Normal Milestone:
Component: Core : Tables Version: 3.6.2
Keywords: Cc:

Description

Hello everyone, I've got a problem with ckeditor, and it's been there for a few years. I've been waiting for the latest updates, but even in there, the issue exist. Or am I doing something wrong ?

Imagine this: I create a table with width 650px, divided into 3 columns (width of column A is 300px, width of column B is 50px and the width of column C is 300px), padding and margins are set to 0, no borders. Then I insert an image with an exact width of 300px in column C, border = 0. You might think that's no problem, but immediately after inserting the image, the visual width of column B gets less, I think it 'shrinks' untill a width of 45px. When I resize the image to 299px, the visual width gets bigger. After repeating this resizing, I see that when my pictures gets the size of approximetally 290px the width of the columns looks like they should. But now I have a picture that's to small for the column.

I tried about everything (I guess). Even give all the cells their appropriate width mannually. Nothing seems to help.

Thanks in advance for all the help.

Kind regards,

Jos de Nijs

Attachments (6)

example1.png (123.2 KB) - added by Jos de Nijs 7 years ago.
The code belonging to example1
example2.png (36.5 KB) - added by Jos de Nijs 7 years ago.
Example of the situation I discussed
borders.png (134.0 KB) - added by Jakub Ś 7 years ago.
example3.png (267.6 KB) - added by Jos de Nijs 7 years ago.
example4.png (219.3 KB) - added by Jos de Nijs 7 years ago.
change border.png (46.3 KB) - added by Jakub Ś 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by Jos de Nijs

Attachment: example1.png added

The code belonging to example1

Changed 7 years ago by Jos de Nijs

Attachment: example2.png added

Example of the situation I discussed

comment:1 Changed 7 years ago by Anna Tomanek

FYI, this issue was first reported on the community forum: http://cksource.com/forums/viewtopic.php?f=11&t=24808

Changed 7 years ago by Jakub Ś

Attachment: borders.png added

comment:2 Changed 7 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

This is because CKEditor adds dotted borders (see attachment) so that users wouldn't get lost when thy insert or type something.

When you save your page or watch it in the preview, result is as expected. You can verify that with firebug.

Changed 7 years ago by Jos de Nijs

Attachment: example3.png added

Changed 7 years ago by Jos de Nijs

Attachment: example4.png added

comment:3 Changed 7 years ago by Jos de Nijs

I understand your point of view. But can you explain the following to me then? You see the image. Once you remove the image from the right column you'll see that a word from the second line to the first line. See my examples.

So I guess, it's got nothing to do with the dotted borders, since they are there in both situations.

Hope to hear from you.

Changed 7 years ago by Jakub Ś

Attachment: change border.png added

comment:4 Changed 7 years ago by Jakub Ś

But pixels taken by borders have to be subtracted somewhere.

Table is 650px wide
Cells borders have 6*1px = 6 px
Table border has 2*1px = 2px

This gives us 642px of available width. 1st cell has 293px, 2nd has 49px, 3rd 300px.

For the future, please start using Firebug to check such things.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy