[Solved] HTML Table Height CSS not working

ramco1917
 
on Mar 11, 2022 09:54 PM
580 Views

Hi

Table height has no effect.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <table class='table table-bordered table-hover datatable-highlight' id='tbldata' display: block; height: 100px; overflow-y: scroll;>
            <thead>
                <tr>
                    <th class='nosort2'>#</th>
                    <th>Lead Number</th>
                    <th>Name</th>
                    <th>Child Name</th>
                    <th>Lead Date</th>
                    <th>Mobile / Session</th>
                    <th>Lead Current Status</th>
                    <th>Next Action</th>
                    <th>Date</th>
                </tr>
            </thead>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>

Thanks

Download FREE API for Word, Excel and PDF in ASP.Net: Download
arjunv
 
on Mar 11, 2022 09:54 PM
on Jun 13, 2022 06:25 AM
ramco1917 says:
display: block; height: 100px; overflow-y: scroll;

Hi Ramco,

Your CSS Style tag is missing please set Style tag and refers below modified code.

HTML

<table class="table table-bordered table-hover datatable-highlight" id="tbldata" style="display: block; height: 100pt; overflow-y: scroll">
    <thead>
        <tr>
            <th class='nosort2'>#</th>
            <th>Lead Number</th>
            <th>Name</th>
            <th>Child Name</th>
            <th>Lead Date</th>
            <th>Mobile / Session</th>
            <th>Lead Current Status</th>
            <th>Next Action</th>
            <th>Date</th>
        </tr>
    </thead>
</table>

Demo