How to create a vertical line with CSS?
https://www.tutorialspoint.com/how-to-create-a-vertical-line-with-css
-
13-09-2020 - |
Domanda
How to create a vertical line with CSS?
To create a vertical line with CSS, the code is as follows −
Example
<!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 −
Advertisements
Non affiliato a Tutorialspoint