issue with a non-functional sticky sidebar within a Tailwind post

I am trying to create a layout similar to this website. One of the key features I want to replicate is the sidebar that follows you as you scroll.

Here is the code I have, but unfortunately, I can't seem to get it to work:

<template>
    <div class="blog-post">
        <div class="wrapper">
            <aside class="sidebar">
                <div class="sidebar-wrapper">
                    <!--- Content -->
                </div>
            </aside>

            <main class="main-post">
                <!--- Content -->
            </main>
        </div>
    </div>
</template>


<style lang="postcss" scoped>
.blog-post {
    @apply container;
    .wrapper {
        @apply flex gap-x-10 mt-10;
        .sidebar {
            @apply relative h-screen w-3/12 col-span-3 justify-center;
            &-wrapper {
                @apply h-full space-y-4;
            }
        }

        .main-post {
            @apply w-9/12 space-y-4;
        }
    }
}
</style>

Visually, this is how it currently appears:

The pink div should extend all the way down when scrolling, but for some reason, it does not behave as expected.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Every time I switch views using the router in vue.js, my three.js canvas gets replicated

After creating a Vue.js integrated with three.js application, I encountered an issue with the canvas getting duplicated every time I opened the view containing the three.js application. The canvas remained visible below the new view, as shown in this image ...

Inert child component in Vue

Within an application utilizing a Vuex store, there exists a getter named getQueryParams. This getter retrieves an object that contains the parameters being sent to a database query. If any parameters are present (indicating that the user has performed a q ...

What is the best way to center the startIcon material ui icon?

I'm having trouble keeping the icon button centered on my page. When I add left: "0.5rem" to the sx prop, it ends up pushing the button icon even further away from center. I'd prefer not to use makeStyles to manually override the position. Any ad ...

How can Enums be utilized as a key type for transmitting properties in Vue?

After stumbling upon a helpful method on Stack Overflow that demonstrated how to use an enum to define an object, I decided to implement this in my Vue project. export enum Options { randSize = 'randomSized', timer = 'showTimer', ...

TypeScript throws an error if trying to access an Object variable using a String

While the code below is functioning as intended, I am encountering an error in the VS Code Typescript compiler stating that "Type 'String' cannot be used as an index type". Oddly enough, using a string literal instead of a variable like ...

jQuery Function malfunctioning after initial click

I have developed a function that plays and pauses music. It is designed to be simple and lightweight for small audio samples, with basic play and stop functionalities. The issue I'm encountering is that after playing the music for the second time, the ...

Failure to Connect HTML with Stylesheet

Feeling a bit lost here. I've been attempting to connect my homepage to my stylesheet, but no matter how often I refresh the page, it just won't recognize the link. I'm diligently following the instructions from the guide I have, copying and ...

PHP code isn't showing any posts

Context: I have implemented a PHP loop to generate a dynamic feed of my portfolio posts on my WordPress website. Issue: The first five posts are being displayed correctly, but the subsequent posts are not. I'm uncertain about the underlying cause and ...

Exploring input in interactive table

Just started learning Vue.js and I could use some guidance! I'm attempting to add a Search input for each column to filter results for the user This is the code in my HTML file: <div id="table" > <div class=" cont ...

Modify the background color of a pseudo-element's property value dynamically

How do I change the background color of my burger menu by clicking on an icon? This is the CSS code I have: :root{ --pseudo-backgroundcolor: yellow; } .menu__icon span, .menu__icon::before, .menu__icon::after{ background: va ...

Alignment issue with reCAPTCHA box detected

Why can't I seem to align the reCAPTCHA form properly on my registration page? Even though the div it is within has its text-align property set to center, the form still displays on the left side of the page: However, when I use JavaScript to chang ...

Troubleshooting Vue.js unit test issues caused by log messages from internal components

I am working with a component structured like this: <template> <p>{{ message }}</p> <internal-comp></internal-comp> </template> <script> import InternalComp from './components/InternalComp.vue'; ...

Execute a function once the router-view in the App.vue component has been refreshed following a route alteration triggered by vue-router

Is there a way to trigger a function after the contents in <router-view/> within App.vue have been updated following a route change? I attempted using the updated() lifecycle hook, but the function is not being executed. Interestingly, the function ...

Adding a semi-transparent layer to cover half of the canvas while still allowing the canvas to be visible

I'm struggling with overlaying a div on top of a canvas while keeping the canvas visible. Currently, I can only get the div to cover the canvas and hide it. If anyone has an example to share, that would be greatly appreciated. var canvas = document ...

Alternate. (individually)

Issue with Running Program I've been struggling to get my program to run correctly. The task at hand is to have the program display only one question at a time. But no matter what I try, clicking on all questions displays all the answers simultaneous ...

The functionality of TypeScript's .entries() method is not available for the type 'DOMTokenList'

I'm currently working with a stack that includes Vue3, Vite, and TypeScript. I've encountered an issue related to DOMTokenList where I'm trying to utilize the .entries() method but TypeScript throws an error saying Property 'entries&apo ...

How can I utilize CSS to dictate color schemes on an HTML5 canvas element?

Currently, I am working on a checkers project where the first step is to create the initial board. The way we are currently implementing this has raised a philosophical concern. We are using the fillRect function to define the color of the "dark" squares a ...

Find all paragraphs with the CSS property "background-color" using JQuery

My task involves modifying the CSS of a paragraph tag that has a background color of #aaddff. The code I have written seems to be missing something, as the border is not appearing as expected. Should I use element.style or is there a different approach I ...

Exchanging data between dynamic child components

As a newcomer to vuejs, I've encountered an issue with my parent component and its child components. The children swap in and out using <component :is="view">, where the view is a property of the parent component. Each child component needs to b ...

The VueRouter is unresponsive and not functioning as expected

I have been delving into Vue. Through the npm install vue-router command, I added vue-router to my project. Subsequently, I incorporated VueRouter and defined my URL paths within the VueRouter instances located in the main.js file. I created an About compo ...