¿Fue útil?

Pregunta

How to create a vertical line with CSS?

CSSWeb DevelopmentFront End Technology

To create a vertical line with CSS, the code is as follows −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
   .vLine {
      border-left: 6px solid rgb(128, 0, 128);
      height: 500px;
      margin-left: 5%;
   }
</style>
</head>
<body>
<h1>Vertical Line Example<h1>
<div class="vLine"></div>
</body>
</html>

Output

The above code will produce the following output −

raja
Published on 12-May-2020 14:06:18
Advertisements
¿Fue útil?
No afiliado a Tutorialspoint
scroll top