Skip to main content
Known Participant
Jun 8, 2018 8:14 PM UTC
Question

Insert table is auto including column width

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 is closed to new replies. Start a new post to keep the conversation going.

5 replies

Captiv8r
Legend
Jun 11, 2018 12:59 AM UTC

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

Translate
AURORAxmpAuthor
Known Participant
Jun 11, 2018 1:05 PM UTC

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. 

Translate
Captiv8r
Legend
Jun 11, 2018 2:05 PM UTC

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

Translate