I am having problems with css, how can I make the dots to be always centered based on li height? Also how do I set proper height of first and last element, li
has different height based on content so I can't use calc, is this even possible?
What am I trying achieve: Image
body {
margin: 0;
}
.tree {
position: relative;
}
.tree {
position: relative;
list-style: none;
}
li {
padding-bottom: 1.5rem;
border-left: 1px solid #abaaed;
position: relative;
padding-left: 20px;
margin-left: 10px;
max-height: 100px;
}
li:last-child {
padding-bottom: 0;
border: none;
}
li::before {
content: '';
width: 15px;
height: 15px;
background: white;
border: 1px solid #4e5ed3;
border-radius: 50%;
position: absolute;
left: -8px;
top: 0px;
}
li::after {
content: '';
width: 10px;
height: 2px;
position: absolute;
left: 7px;
top: 6px;
background: #4e5ed3;
}
button {
padding: 10px 20px;
}
<div>
<ul class="tree">
<li><Button>Start</Button></li>
<li>
Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.
</li>
<li><Button>
End</Button></li>
</ul>
</div>
Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.