Skip to main content

css

the name of a CSS class(es) applied to a cell of Layout

css?: string;

Example

<style>
.my_first_class {
/*some styles*/
}

.my_second_class {
/*some styles*/
}
</style>

const layout = new dhx.Layout("layout_container", {
rows: [
{
id: "toolbar",
html: "Header",
css: "my_second_class",
height: "60px"
},
{
id: "content",
html: "Content",
css: "my_first_class",
}
]
});

Related sample: Layout. Styling (custom CSS)

Note, that the DHTMLX library provides a set of own CSS classes that you can also apply to change the appearance of a Layout cell.

const layout = new dhx.Layout("layout_container", {
css: "dhx_layout-cell--bordered",
rows: [
{
id: "toolbar",
html: "Header",
css: "dhx_layout-cell--border_bottom layout-header",
gravity: false,
height: "60px"
}
]
});