I’ve got a div element with some content (shown in the picture). I want (for styling purposes) create a vertical line next to it with the exact same height (needs to be responsive so a static “height” value isnt working)
Does anybody have ideas?
Advertisement
Answer
You can attain it using a simple border on the left.
JavaScript
x
4
1
.mytext {
2
border-left:3px solid red;
3
padding-left:15px;
4
}
JavaScript
1
10
10
1
<div class="mytext">
2
<h1>Head<h1>
3
<p>text here</p>
4
<p>text here</p>
5
<p>text here</p>
6
<p>text here</p>
7
<p>text here</p>
8
<p>text here</p>
9
<p>text here</p>
10
</div>