The text centered, but it’s still padded on the left side. See the attached picture for an example. The black line is the same length on both sides, but it’s sticking into the word in the header because the word isn’t truly centered. Also, the filter box isn’t centered if you look at the arrows. The blue space on the left is almost twice as wide.
That seems to have worked. It moved the filter box too far to the left, but I can adjust it now by modifying the padding number in the code you provided.
However, there’s another issue. The filter box isn’t extending all the way to the end of the column. It’s not very noticeable on small columns, but it’s very obvious if the column is wide. See the attached picture.
This is the init code:
var filters = “#select_filter,#text_filter,#text_filter”;
var hdr_align = [‘text-align:center;’,‘text-align:center;’,‘text-align:center;’];
var widths = “100,*,100”;
I just started using dhtmlx again almost 6 years later and this is still a problem. However, the previous solutions don’t seem to work. How can I fix both issues shown above?
Note for others who may find this: make sure you apply these styles after you include dhtmlx.css. Also, the theme needs to match the css line. In my case, I am using material, so change gridbox_dhx_skyblue to gridbox_material.
I also wanted for align the grid headers, which is either impossible or very difficult via XML configuration. It was easy to fix using css in conjunction with the fixes mentioned in this thread regarding padding:
Note: I ended up using 98% instead of 100% because it looks weird without a small gap. I will probably edit the percentage for input boxes above a certain size to account for very wide columns.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan