Space between border and content? / Border distance from content?

Viewed 148481

Is it possible to increase the distance between a border and its content? If it is possible, just do it on here: JSFiddle

What I plan on doing is putting a glow around the content (using a shadow with 0px/0px distance) and then putting a border a couple of pixels away from the glow.

NOTE: I have decided to do an inset shadow and a border instead, it looks better, but thanks for the answers :3

6 Answers

If you have background on that element, then, adding padding would be useless.

So, in this case, you can use background-clip: content-box; or outline-offset

Explanation: If you use wrapper, then it would be simple to separate the background from border. But if you want to style the same element, which has a background, no matter how much padding you would add, there would be no space between background and border, unless you use background-clip or outline-offset

Related