Skip to main content

HtmlDocumentExporterOptions.UseCssForWidthAndHeight Property

Gets or sets a value indicating whether to use the CSS style attribute to specify the width and height of table elements.

Namespace: DevExpress.XtraSpreadsheet.Export

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

[DefaultValue(true)]
public bool UseCssForWidthAndHeight { get; set; }

Property Value

Type Default Description
Boolean true

true, to use CSS; otherwise, false.

Remarks

According to the HTML5 standards, the width attribute on the <table>, <col> and <td> elements and the height attribute on the <table>, <tr> and <td> elements are now obsolete. To comply with these rules, the UseCssForWidthAndHeight property is true by default and exports the width and height of table elements using the CSS inline style attribute for the corresponding tags. However, if you wish to use the obsolete way to specify a table width and height, set the UseCssForWidthAndHeight property to false. In this case, the width and height values will be exported to HTML as the regular width and height attributes of table tags.

See Also