
/* ===== SIMS RESPONSIVE CSS ===== */

/* ── Tablet (max 768px) ── */
@media (max-width: 768px) {

    .sidebar {
        display: none !important;
    }

    .main-panel,
    .content-wrapper {
        width: 100% !important;
        padding: 10px !important;
        margin-left: 0 !important;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .card {
        margin-bottom: 15px;
    }

    .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    .form-control,
    .form-select {
        width: 100% !important;
    }
}

/* ── Mobile (max 480px) ── */
@media (max-width: 480px) {

    .page-title {
        font-size: 1.2rem !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .table thead th,
    .table tbody td {
        font-size: 0.78rem;
        padding: 8px !important;
    }

    .navbar {
        padding: 8px !important;
    }

    .navbar-brand img {
        height: 30px;
    }
}  also fix responsive.css   fix this tow code
Lite
I've received your additional requirements and the navBar.php file. I will now integrate the responsive CSS fixes into a new responsive.css file and ensure navBar.php is optimized for all screen sizes.
Analyzed the CSS, confirmed media queries cover all device sizes, and plan to integrate these fixes into `responsive.css` while optimizing `navBar.php` for responsiveness.

Analyzed navBar.php structure and profile image styles; will implement comprehensive media queries in responsive.css and optimize the navbar for responsiveness next.

Lite
I have fixed both responsive.css and navBar.php to ensure they work seamlessly across all screen sizes.
1. responsive.css Improvements:
Unified Media Queries: Integrated your requested tablet (768px) and mobile (480px) rules with additional laptop and large desktop optimizations.
Layout Stability: Ensured the sidebar hides correctly on tablets and the main panel expands to 100% width.
Enhanced Mobile UI: Scaled down font sizes for tables and page titles on small screens to prevent layout breaking.
Navigation Scaling: Added specific rules for the navbar brand and togglers to stay aligned on mobile.
2. navBar.php Optimization:
Dynamic Visibility: Adjusted the profile name and navigation items to hide or scale based on screen width, preventing overlap on tablets.
Logo Scaling: Added mw-100 (max-width: 100%) to logos so they resize naturally on smaller headers.
Button Sizing: Refined the logout button to a smaller size (btn-sm) for better fit on medium-sized screens.
You can now use these files in your project. Ensure you link responsive.css in your head.php or main layout file.
responsive.css
Code · 2.67 KB
navBar.php
Code · 4.05 KB
View all files in this task
Task completed
How was this result?
Suggested follow-ups




responsive.css
/* ===================================================================
   ===== SIMS RESPONSIVE CSS (MOBILE, LAPTOP, DESKTOP) =====
   =================================================================== */

/* ── Large Desktop (min 1200px) ── */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ── Laptop / Desktop (992px to 1199px) ── */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    .navbar-brand.brand-logo img {
        width: 200px !important;
    }
}

/* ── Tablet & Small Laptop (max 991px) ── */
@media (max-width: 991px) {
    .navbar-menu-wrapper {
        width: calc(100% - 70px);
        padding-left: 15px;
        padding-right: 15px;
    }
    .navbar-brand-wrapper {
        width: 70px !important;
    }
    .navbar-brand.brand-logo {
        display: none;
    }
    .navbar-brand.brand-logo-mini {
        display: inline-block !important;
    }
}

/* ── Tablet (max 768px) ── */
@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    .main-panel,
    .content-wrapper {
        width: 100% !important;
        padding: 15px !important;
        margin-left: 0 !important;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card {
        margin-bottom: 15px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .form-control,
    .form-select {
        width: 100% !important;
    }

    /* Navbar specific for tablet */
    .navbar .navbar-menu-wrapper .navbar-nav-right {
        display: none !important; /* Hide right nav items on small screens to avoid overlap */
    }
}

/* ── Mobile (max 480px) ── */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px;
    }

    .card-body {
        padding: 0.8rem !important;
    }

    .table thead th,
    .table tbody td {
        font-size: 0.7rem;
        padding: 6px !important;
    }

    .navbar {
        padding: 5px !important;
        height: 60px;
    }

    .navbar-brand-wrapper {
        height: 60px;
    }

    .navbar-brand img {
        height: 25px !important;
        width: auto !important;
    }

    .content-wrapper {
        padding: 10px !important;
    }

    /* Search bar on mobile */
    .search-field {
        width: 100%;
        margin: 5px 0;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
    }
}

/* ── Extra Small Mobile (max 320px) ── */
@media (max-width: 320px) {
    .navbar-brand-wrapper {
        width: 50px !important;
    }
}

