how to style for nested item
Hi guys, I wonder how to style for nested items like the image. There may be a lot of nested item. Thank you
6 Replies
As with most things, there are many ways to achieve this.
I created something like this a few weeds 😆 weeks ago after having a similar question.
It uses pseudo elements to generate the lines and can handle an unlimited amount of nesting:
https://codepen.io/cbolson/pen/gOVrZpz
don't smoke to much of those 😜
My layout is a table and all rows include nested rows will have an icon in the last column. How can I handle this problem?
what have you tried? Do you have any code? If so, please share it in codepen or something similar
here is html and css I use: https://jsbin.com/kahaburocu/edit?html,css,output
I'm using a function to recursive render the nested item like this
JS Bin
A live pastebin for HTML, CSS & JavaScript and a range of processors, including SCSS, CoffeeScript, Jade and more...