Skip to main content
Known Participant
June 8, 2018
Question

Insert table is auto including column width

  • June 8, 2018
  • 1 reply
  • 716 views

Robohelp 2017

I am working on creating a CSS style for a table.  I want the first column to be a fixed width (to accommodate an image) and can't seem to figure it out.  I thought I had all the CSS html code defined properly, but when I insert I get <col style="width: 50%;" /> added automatically to the topic html code, which of course overwrites my CSS.  Anyone know how to make this stop?

This topic has been closed for replies.

1 reply

Captiv8r
Legend
June 11, 2018

One of my favorite features is the "Autofit" for tables.

If you choose autofit and stick an image in a cell, the column should size just to fit the width of the image. Shouldn't that work?

Cheers... Rick

AURORAxmpAuthor
Known Participant
June 11, 2018

Thanks for the reply.  I have the image set-up as a background-image: in the CSS, so I guess it doesn't 'see' the image?  Is there a way to autofit just the first column in the CSS?  These 50% tags are being added automatically when I insert the table, but I want my CSS to control things so it is consistent.  I'm still learning html and maybe I missed how to do that.  Basically, I'm trying to setup a style for highlighted notes.  So the first column is the image and the second column will hold the text. 

Captiv8r
Legend
June 11, 2018

If the first column will only ever just hold an image, why configure it in CSS? Since you are dealing with a table, it seems it would be simpler to just plop the image into the cell. But that's just me.

I'm no CSS expert, so that's likely why I don't just "go there" when dealing with things like this.

Perhaps another author visiting here has a better idea.

Cheers... Rick