I’m trying to figure out the css to display an image with a 1px black border then a 9px white border around that. Is there an easy way to do this?
The div around image answer almost works, but I still have big gaps on either side of my image (outside of the 1px border and inside of the 9px border). It seems like the div tag is stretching to fit the entire window for some reason.
I ended up using the padding/border in img styling option.
On img, set the background to black and add 1px of padding then the border can be the 9px of white.
img {
background-color:#000;
padding:1px;
border:9px solid #fff;
}
This will give a double border as long as you don’t have transparent images.