FixedHeader with a fixed element in a page doesn't work

FixedHeader with a fixed element in a page doesn't work

lucacali87lucacali87 Posts: 30Questions: 10Answers: 2
edited October 2016 in Free community support

Hi, I have a fixed element at the top of my page to see notifications but when I use this fixed element my datatable doesn't work.
This is the HTML code where I define the fixed element and inside it I have datatable:

<body class="hold-transition skin-blue fixed sidebar-mini"
.....
       <div class="box-body">
       <!--  Fleets table -->
    <table id="acquisitionsTable"
        class="table table-bordered table-striped">
            <thead>
                <tr>
                        <th>Data</th>
                    <th>Shift</th>
                    <th>Mission profile</th>
                    <th>Initial Km</th>
                    <th>Dataset</th>
                    <th>DR channels</th>
                    <th>Status</th>
                    <th>Dat</th>
                    <th>Mat</th>
                    <th>Pdf</th>
                    <th>Others files</th>
                    <th>Edit</th>
                </tr>
            </thead>
        </table>
    </div>

This is the fixed css code:

/* Fixed layout */
.fixed .main-header, .fixed .main-sidebar, .fixed .left-side {
    position: fixed;
}

.fixed .main-header {
    top: 0;
    right: 0;
    left: 0;
}

.fixed .content-wrapper, .fixed .right-side {
    padding-top: 50px;
}

@media ( max-width : 767px) {
    .fixed .content-wrapper, .fixed .right-side {
        padding-top: 100px;
    }
}

.fixed.layout-boxed .wrapper {
    max-width: 100%;
}

If I remove fixed tag datatable works but my page doesn't have fixed element. I have tried both Offset - automatic and manual without result.
May the problem be linked to the fact that the table is in the fixed body tag field?

Answers

  • lucacali87lucacali87 Posts: 30Questions: 10Answers: 2

    I resolved adding

    headerOffset: $('#navMenu').outerHeight()
    

    Thanks

This discussion has been closed.