Question re table widths

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Fiona
Sr. Propeller Head
Posts: 118
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.

Question re table widths

Post by Fiona »

Is there a way of specifying "make the table as wide as it needs to be to fit this information in and no wider but if that's not wide enough then 100%"?
Paulie
Sr. Propeller Head
Posts: 140
Joined: Sun Mar 01, 2015 3:01 pm

Re: Question re table widths

Post by Paulie »

Hi there,

Assuming that you are not overriding the table width defaults (either inline or via CSS), the table should automatically behave the way that you desire. For example, the following table will expand to fit the text, but if the text is wider than the parent element or page width then the table will be automatically wrapped.

Code: Select all

<table>
			<col />
			<tbody>
				<tr>
					<td style="background-color: #2c4859;">The quick brown fox jumps over the lazy dog.</td>
				</tr>
			</tbody>
		</table>
If the above html code:
  • works for you - this suggests that your individual table widths are hardcoded. If this is the case, view the table in the text editor and remove any width-specific information. Also, when adding tables using the Flare UI, ensure that the Auto Fit to Contents option is selected. This option does not specifically set the table width.
  • does not work for you - this suggests that your CSS file is overriding the defaults. If this is the case, then you may need to alter the table class in your style sheet, or create a new sub class (depending on whether you want all tables to be handled the same way, or only tables that you specifically specify).
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."
Post Reply