How to make a vertical line [closed]

5

Hello, I wanted to know how to do a vertical line with this code:

<hr>

By default it's horizontal, I wanted it very vertical, does anyone know how? I just wanted this code because I have it vertically on my site too.

    
asked by anonymous 30.07.2016 / 00:32

2 answers

6

You can add vertical line with HTML and CSS as follows:

.linha-vertical {
  height: 500px;/*Altura da linha*/
  border-left: 2px solid;/* Adiciona borda esquerda na div como ser fosse uma linha.*/
}
<div class="linha-vertical"></div>

You can put line in the center using two elements <div> , as in the example below:

.box {
 width: 50%;
 float: left;
 height: 300px;/*Altura da linha*/
}

.linha-vertical {
 border-left: 2px solid;/* Adiciona borda esquerda na div como ser fosse uma linha.*/
 box-sizing: border-box;
}
<div class="box">

</div>
<div class="box linha-vertical">

</div>
    
30.07.2016 / 00:44
1

This "code" is actually an HTML markup to create a horizontal line.

In PHP there are no functions that render HTML on the page. I believe that what you can do is;

Create a div, put the border (left or right) with the color and thickness you want and wrath will generate a line.

    
30.07.2016 / 00:39