Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

arkanrosyid's avatar

Sidebar that overlapping with my page content

Hi everyone, i need help with some issue with my frontend code that my sidebar overlapping the content page (look at the image).on that sidebar i have few functionality like : toggle-sidebar for open sidebar when it on mobile mode , sidebar menu with accordion with presist the sidebar menu with accordionn that when navigation to another page is unchanged. when i don't presist sidebar menu accordion it's not overlapping, but after i add presist menu accordion my sidebar start overlapping. it's my first project using tailwind and vue so i don't know how to fix it, i'm already use gpt and it doesn't work.

Image

Here my code file :

Dashboard.vue as layout

Sidebar.vue

Navbar.vue

Page.vue

<template>
    <Dashboard>
      <!-- Page Content -->
      <div>
        <h2 class="text-xl font-bold">Welcome to the Page</h2>
        <p class="mt-2 text-gray-700">This is your main content area.</p>
        <div class="mt-4 p-6 bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-gray-500">Example Card</div>
      </div>
    </Dashboard>
  </template>
  
  <script setup>
  import Dashboard from '../../Layouts/_default/Dashboard.vue';
  </script>
0 likes
0 replies

Please or to participate in this conversation.