Skip to content
alex [dot] kramer [at] g_m_a_i_l [dot] com edited this page Jul 31, 2025 · 8 revisions

Hide scrollbar

.container {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}
.container::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}

Flex scrollable column

<style>

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 500px;
    background-color: magenta;
}

.content {
    flex: 1;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thing {
    font-size: 64pt;
    color: yellow;
}

html, body {
    height: 100%;    
}

header {
    background-color: chartreuse;
}

footer {
    background-color: cyan;
}
</style>
<div class="container" >
    <header id="header" >This is a header</header>
    <div class="content" >
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
        <div class="thing">asdf</div>
    </div>
    <footer id="footer" >This is a footer</footer>
</div>

Floating corner debug panel

.debug-panel {
    border: 1px dashed magenta;
    padding: 6px;
    background: lightcyan;
    position: fixed;
    width: 600px;
    overflow: auto;
    bottom: 0;
    right: 0;
}

"Lift" on hover

  transition: transform 0.3s ease, box-shadow 0.3s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

Scroll content fade-out

<head>
  <style>
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      text-align: center;
    }

    .header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 80px;
      background: url("https://background-tiles.com/overview/mixed-colors/patterns/small/1115.png") repeat fixed;
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      z-index: 10;
    }

    .top-gradient {
      width: 100%;
      height: 60px;
      position: fixed;
      top: 80px;
      background: url("https://background-tiles.com/overview/mixed-colors/patterns/small/1115.png") repeat fixed;
      mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
      mask-composite: intersect;
    }

    .content {
      margin-top: 80px; /* Offset for the fixed header */
      padding: 20px;
      background: url("https://background-tiles.com/overview/mixed-colors/patterns/small/1115.png") repeat fixed;
      height: calc(100vh - 80px);
      overflow-y: auto;
    }

    .thing {
      background-color: #ddd;
      margin: 10px 0;
      padding: 15px;
      border-radius: 5px;
      font-size: 18px;
    }
  </style>
</head>
<body>
  <div class="header">THIS IS MY HEADER</div>
  <div class="top-gradient"></div>
  <div class="content">
    <div class="thing">I AM THING 1</div>
    <div class="thing">I AM THING 2</div>
    <div class="thing">I AM THING 3</div>
    <div class="thing">I AM THING 4</div>
    <div class="thing">I AM THING 5</div>
    <div class="thing">I AM THING 6</div>
    <div class="thing">I AM THING 7</div>
    <div class="thing">I AM THING 8</div>
  </div>
</body>
</html>
Clone this wiki locally