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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -