Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Yeah, I was trying to make it a one-click option since I'll be using these Note blocks a lot. I want to make it as simple as possible in case the project ever gets handed over to someone else. Seems doable except that RoboHelp is automatically adding the tables with the forced column widths at the topic level. I was hoping to have some kind of option where nothing would have to be changed by the user once the table/style was selected, so they could just add the text. I'll hope someone else that looks as this has a solution.
Copy link to clipboard
Copied
One way to simplify this is to create a Snippet with the table in it. Then add the snippet to the topic, then after adding, right-click and convert the snippet to Topic HTML.
Cheers... Rick