* { margin:0; padding:0; list-style:none; } img { border:0; width:300px; height:150px; } .box { width:300px; height:150px; margin:20px auto; position:relative; border:1px solid #eee; } .box .border-left { width:1px; height:0px; background:black; position:absolute; left:-1px; bottom:0; } .box .border-bottom { width:0px; height:1px; background:black; position:absolute; left:0; bottom:0px; } .box .border-top { width:0px; height:1px; background:black; position:absolute; right:0; top:0px; } .box .border-right { width:1px; height:0px; background:black; position:absolute; right:-1px; top:0; }