I have an image below, I am trying to create a diagonal line in CSS I need it to look like the red diagram below,
I also need this preferably to be 1 div is this possible? I found this example but this is showing the diagonal line within another div.
I have made this so far but its in 3 different divs.
div{
content:"";
position:absolute;
border-top:1px solid red;
width:100px;
transform: rotate(45deg);
transform-origin: 0% 0%;
}
#help{
content:"";
position:absolute;
border-top:1px solid red;
width:180px;
transform: rotate(0deg);
transform-origin: 0% 0%;
margin-top:70px;
margin-left:70px;
}
#help1{
content:"";
position:absolute;
border-top:1px solid red;
width:100px;
transform: rotate(-45deg);
transform-origin: 0% 0%;
margin-top:70px;
margin-left:250px;
}
<body>
<div></div>
<div id="help"></div>
<div id="help1"></div>
</body>