How to create a website border

…that stays on the boundaries of the website background when scrolling down, similar to this example:

www.fabianfreytag.com/home/

I would appreciate a little help. I have tried with this code but it creates a border thats always visible (on the top, left and right side…not on the bottom for whatever reason) no matter if I scroll or not:

<style>
  body {
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    border: 10px solid #ff0000;
  }

  @media screen and (max-width: 768px) {
    body {
      border-width: 5px; /* Adjust the border width for smaller screens */
    }
  }
</style>

Thanks a lot! :slight_smile:

hey…

don´t apply it onto the body, use this div:

.mag-pages-container {
border: 10px solid #ff0000;
}

to look good you might want to hide the scrollbar, or pay with the width/padding/margins because the border might hide underneath the scrollbar.

Thanks for reaching out. Sadly it only shows the Border on the Top and left side, regardless of what margins i use. Furthermore, the top Bar stays visible when scrolling down. Im helpless :frowning:

ok, I see.
and why dont you build it just inside rm with some shapes/lines?