Is there a way to dephase the border of a div?

498 views html

I'm trying to achieve this design in which every div of certain class of my site shows the border kind of dephased from the actual content of that div as seen in the image (link below). Is there a way to achieve this with css?

answered question

What have you tried? Can you show us your html markup code?

1 Answer


If you know the height and width, you can try this:


<div class="img-container">
  <img src=""/>


  display: inline-block;
  border: 2px solid blue;
  height: 220px;
  width: 220px;

.img-container img{
  margin-left: 5px;
  margin-top: 5px;

posted this

Have an answer?


Please login first before posting an answer.