Answers for "using positioning to create an offset border"

CSS
0

css offset border

* {
  box-sizing: border-box;
}

.container {
  height: 200px;
  width: 200px;
  position: relative;
  background-color: red;
  margin: 20px;
}

.inner {
  width: 100%;
  height: 100%;
  position: absolute;
  border: 2px solid black;
  top: -10px;
  left: -10px;
  z-index: 10;
}
Posted by: Guest on March-02-2021

Code answers related to "using positioning to create an offset border"

Browse Popular Code Answers by Language