JSFiddle - React, Tailwind, and code Playground

HTML

<div class="game-right">
                    <!-- Upgrades section -->
                    <div id="container" style="max-height: 800px; overflow-y: auto;">
                        <div class="section-title">Employees</div>
                        <div class="tooltip-container">
                            <button id="extraButton" onclick="extraAction();">Worker: $10 (0)</button>
                            <span class="tooltip" id="Workertooltip">Earns $1.5 per second</span>
                        </div>
                    </div>
                    </div>

CSS

/* Basic styling for the page layout */
        body {
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

        /* Main content wrapper adjusted */
        .game-wrapper {
            display: flex;
            width: 100%;
            height: 100%;
          
        }

        /* Left side with burger button */
        .game-right {
   position: 200px, 200px;
    width: 250px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

        /* Right side with controls */
        .game-right {
            width: 250px;
            padding-left: 20px;
            display: flex;
            flex-direction: column;
            gap: 40px;  /* Increased gap between sections */
            
        }

        /* Money display section */
        #moneypers {
            margin-bottom: 20px;
            width: auto;  /* Allow natural width */
        }

        #moneypers input {
            display: block;
            margin-bottom: 8px;
            padding: 8px 12px;
            width: 200px;  /* Fixed width for text boxes */
            border: 1px solid #ccc;
            border-radius: 4px;
            background-color: white;
            font-size: 14px;
        }

        /* Sections styling */
        .section-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 10px;
            color: #333;
        }

        /* Container and upgrade sections */
        #container, #upgrade {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 15px;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        #upgrade, #container {
    max-height: 400px;  /* Limit the height for scrolling */
    overflow: visible;
    padding-right: 20px;  /* Prevent overlap...