Copy link to clipboard
Copied
If I want all of my tables to use the same Preferred Width (80%) regardless of the number of column or the amount of text, do I need to manually set the Table Properties for each table? Is there a way to use Table Styles to do this automatically?
Copy link to clipboard
Copied
Hi,
You can easily set such a global style in your style sheet:
- Open your CSS in an external editor, such as notepad.
- Add: table
- Save your CSS.
Note: This will give all tables a width relative to that of their container. A table in your topic will have 80% of the width of the document body. A table in a dropdown will have 80% of the width of the dropdown.
If your table styles have a width of if you’ve set the width with inline styling, that styling overwrites the global table width. If you don’t get the result you expect, ensure that your tables don’t have an override (i.e. a width attribute in either the CSS or in HTML).
Greet,
Willam
This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.
Copy link to clipboard
Copied
Hi William.
You instructions didn't work when I just added the word "table" to the CSS, but they did work (sort of) when I added the following:
table
{
width: 80%;
}
I say "sort of" since formatting a new table is still a two-step process:
That's an improvement over having to use Table Properties and explicily specifying 80%, so I'm good, but I'm wondering why the new tables I insert still use 100% as the default width. There's nothing in my CSS that specifies a table width other than the lines I added above.
Thanks,
Kathy
Copy link to clipboard
Copied
Hi,
I think that RoboHelp thinks it the sensible thing to do... Perhaps you can edit the table styles, so they are inserted without inline styling. The files holding the table styles are (in RH7) in: C:\Program Files\Adobe\Adobe RoboHelp 7\RoboHTML\Gallery\tables (If you used the standard installation path.)
You can also override the inline styling of the table by adding !important in your css, like this: table . Note that this only overwrites the width and doesn’t delete any inline styling. I recommend this only to temporary save you the trouble of manually formatting all your existing tables.
Greet,
Willam
This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.