css how to stop screen from left and right

82

/* The problem */
.off-screen {
  position: absolute;
  right: -50px;
  
  width: 100px;
  height: 100px;
  
  background-color: red;
}

/* The solution */
body {
  overflow-x: hidden;
}

Comments

Submit
0 Comments