html - div with same margin top and bottom (no %) -
all want have small black line on left of screen borders top , bottom 30px.
it's pretty if use % won't have 30 px on top , bottom.
#border-right { right:0; width: 71px; height: 94%; top: 3%; bottom: 3%; position:fixed; background:rgba(255,255,255,.9); border-left:2px solid black; z-index:1; }
here's i'm stuck — https://jsfiddle.net/9o3t5u2d/
thanks! f.
you can set top , bottom offsets 30px, no math required.
i not sure why need width , background color, can add needed.
#border-right { position: fixed; z-index: 1; right: 0; top: 30px; bottom: 30px; box-sizing: border-box; border-right: 2px solid black; width: 30px; /* not sure if need this... */ background: rgba(125, 125, 125, .5); /* not sure if need this... */ }
<div id="border-right"></div>