html - White border not showing up (css) -


i tried on ux, apparently wrong place , answered misunderstood question anyways.

so, want image(s) have 5px white (#fff) border, shadow falling off of border. i've seen somewhere, read it, reason code isn't working. see img, , shadow. no border in between @ all.

this i've got:

    img {         border: 5px solid #fff;         margin: 5px;         position:relative;         -webkit-box-shadow: 1px 1px 1px 1px #ccc;         -moz-box-shadow: 1px 1px 1px 1px #ccc;         box-shadow: 1px 1px 1px 1px #ccc;             opacity: 0.5;          filter: alpha(opacity=50); /* ie8 , earlier */ } 

which looks this:

example 1

but want this:

example 2

it easy. add padding image other properties have defined

img {         border: 5px solid #fff;         margin: 5px;         padding: 5px;         position:relative;         -webkit-box-shadow: 1px 1px 1px 1px #ccc;         -moz-box-shadow: 1px 1px 1px 1px #ccc;         box-shadow: 1px 1px 1px 1px #ccc;             opacity: 0.5;          filter: alpha(opacity=50); /* ie8 , earlier */ } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -