My goal is to rotate the text without any issues, but I'm having trouble with the line underneath it. The line should adjust its length based on the length of the text. In other words, as the text changes in length, the line should shrink or expand accordingly while keeping the top of the text in the same position.
Any suggestions?
https://i.sstatic.net/kZfj8.png
UPDATE:
This is what I've attempted so far (ignore the flex):
<section class="slideshow">
<div class="forsale">
<a href="#">te koop</a>
<span></span>
</div>
<img src="./img/project_1.jpg" alt="">
</section>
.forsale {
position: relative;
a {
position: absolute;
transform: rotate(-90deg) translate(0 ,100%;
transform-origin:0% 0%;
background-color: #eee;
display: block;
text-decoration: none;
color: black;
width: 385px;
}
span {
display: block;
width: 1px;
height: 100%;
background-color: black;
position: absolute;
left: 50%;
bottom: 0;
}
}
Current progress: https://i.sstatic.net/rv0NE.png