Make Empty div cover whole Cell

Tags: #<Tag:0x00007efc6d161910>

Hey,
I have Custom Renderer(“DayRenderer”) that should just render an empty div(“empty”) with an onClick function. To make it intuitive I want that empty div to cover the whole cell. Where can I set the height and width of that Custom Renderer, so that it covers the whole cell. In the Renderer CSS I tried to do it with

.empty{
width: 100%; height: 100%;}

and in the CSS of the file containing the HoT I tried

.DayRenderer{
width: 100%; height: 100%;
}

None of that worked, so maybe you have a solution?

Greetings,

Florian

Hi @florian.gottschlich

a TD element has a default padding, so your DIV is shorter in width. You would need to overwrite the padding to make your DIV take 100% of the TD space. Here is an example https://jsfiddle.net/handsoncode/gt54byo7/

1 Like