css
Optional. The name of a CSS class(es) applied to a cell of Layout
css?: string;
Example
<style>
.layout-header {
--dhx-background-primary: #3A434A;
}
.dhx_layout-cell-inner_html {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<script>
const layout = new dhx.Layout("layout_container", {
rows: [
{
id: "toolbar",
html: "Header",
css: "layout-header",
height: "60px"
},
// more objects
]
});
</script>
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"
}
]
});