Skip to content
Advertisement

Add vertical line along tree view when expanded

I am trying to add a vertical line along first li elements when they are expanded and remove when they are closed but its not coming out. Will li::after not do the job?. please help me with this.

This vertical line should be along the first level of heirarchy only

I have created a treeview with three list items and shown the implemeted code to which i have to apply vertical lines

JavaScript
JavaScript
JavaScript

Advertisement

Answer

You can do it with .nested.active css rule like below:

You should add below css:

JavaScript

Its added in this snippet:

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement