How do you make a vertical line using HTML?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
One more approach is possible : Using SVG.
eg :
Pros :
Cons :
To create a vertical line centered inside a div I think you can use this code. The 'container' may well be 100% width, I guess.
Why not use |, which is the html special character for |
You can use hr (horizontal line) tag and than rotate it 90 degree with css below
http://jsfiddle.net/haykaghabekyan/0c969bm6/1/
Put a
<div>
around the markup where you want the line to appear to next, and use CSS to style it:You can use an empty
<div>
that is styled exactly like you want the line to appear:HTML:
With exact height (overriding style in-line):
Style the border if you want 3D look:
You can of course also experiment with advanced combinations: