Skip to content

Instantly share code, notes, and snippets.

@tylergaw
Created April 18, 2012 22:23
Show Gist options
  • Save tylergaw/2417036 to your computer and use it in GitHub Desktop.
Save tylergaw/2417036 to your computer and use it in GitHub Desktop.
Centered Vertical line with CSS Gradient
/**
* Centered Vertical line with CSS Gradient
*/
div {
background: #fff;
background: linear-gradient(180deg, transparent, #353535, transparent);
background-position: 50%;
background-repeat: repeat-y;
background-size: 1px auto;
}
/* Setup */
div {
border: 1px solid #ccc;
height: 300px;
width: 90%;
}
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
@avol-io
Copy link

avol-io commented Jul 24, 2017

background: linear-gradient(180deg, $line-color, $line-color);

it's the same without "dashed" problem when user zoom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment