I have a div that contains some text and the div has a background color. I would like a border around the div but I would like it so that there is 1px of white between the div and the border on all sides. Is this possible?
I’ve tried to use border: 3px double #000; but unfortunately this did not have the desired effect. The border ended up inside the div and the space between the two borders was the same colour as the background of the div.
I hope I have explained my query clearly. Thanks in advance for any help.
You can achieve this by using the CSS3 box-shadow property and setting the spread and blur to low values. Check it out at http://www.sitepoint.com/css3-multiple-borders/