Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
TreeTable - Change fixed padding-left
Hello,
i came across this little issue on styling an treetable.
I have very little space for displaying the treetable and want to get rid of all "useless" spacing and reduce the padding to the left as push as possible, but i can't figure out how to change the padding of the elements in the hiearchy.
For example i have a Row1 and a Row2 and Row2 is child of Row one, the generated html looks like that:
<tr class="v-table-row">
<td class="v-table-cell-content" style="width: 789px;">
<div class="v-table-cell-wrapper" style="text-align: left; padding-left: 19px; width: 789px;">
<span class="v-treetable-treespacer v-treetable-node-open" style="width: 19px;">
</span>
<div class="v-label v-widget v-has-width" style="width: 100%;">Ro1
</div>
</div>
</td>
</tr>
<tr class=" v-table-row-odd v-selected">
<td class="v-table-cell-content" style="width: 770px;">
<div class="v-table-cell-wrapper" style="text-align: left; padding-left: 38px; width: 770px;">
<span class="v-treetable-treespacer v-treetable-node-closed" style="width: 38px;">
</span>
<div class="v-label v-widget v-has-width" style="width: 100%;">Row2
</div>
</div>
</td>
</tr>
Now the problem is, that inline css style padding-left:38px and the spacer has a inline width of 38 as well.
As i understand vaadin generated a padding of 19 for every hiearchical level.
But how can i for example change the paddings like - for first level 5px and second level 10px.
Any help would be awesome.
Thanks,
Michael
The width of the spacer is defined in CSS, the selector is .v-treetable-treespacer. If you override that then it should work:
.v-treetable-treespacer {
width: 10px !important;
}
Well, Thanks for that enexpected answer.
I will try that, but i am currently not working on this project.
As soon as it crosses my fingers, i will test this and report :)
Yeah, sorry about that. We've had our vacation period for the last few months, so we are just now catching up on the forum questions :)