I want to give border to my project and I want that border width to adjust according to the content of the project . How can I achieve that

I want this square border to cover the complete width of the cell width and I think the cell width depends on the width of the content of project name so How can I style my border and make it cover whole cell dynamically.

For example My project completion duration is only 1 day that is starting and ending on 10th january so the border that is coming only half of 10th january should cover the whole day. How can I achieve this? Any help would be highle appreciated. Thanks!!

Hello Ashutosh,
It is not recommended to directly modify the DOM elements in Gantt, as you will lose the changes next time Gantt repaints the data. Using a marker is also not a good idea as the vertical markers are supposed to be visible for the whole timeline height.

If you want to display custom elements in the timeline, you need to use the addTaskLayer method:
https://docs.dhtmlx.com/gantt/api__gantt_addtasklayer.html

To obtain the position of the task, you can use the getTaskPosition method:
https://docs.dhtmlx.com/gantt/api__gantt_gettaskposition.html

By using that approach, the border element will always follow the task.

Here is an example of the implementation of the border around the project tasks:
https://snippet.dhtmlx.com/jaaj2p60