css - Border on a side of a DIV -
i want border on right hand side of div.
i do:
<div class="span6" style="border-right: 2px solid #727272;">
the things i'd border not run top , bottom of div. maybe 5px top , 5px bottom. or 90% of height of div. how do this?
thanks
you can use pseudo element hold border. following make "border" 90% of height of parent element:
http://cssdeck.com/labs/kyrvt8hf
div { position: relative; } div:after { display: block; content: ''; position: absolute; top: 5%; bottom: 5%; right: 0; border-right: 2px solid red; }
Comments
Post a Comment