0

I am using Angular 1.6. I have a dynamic table for which I have to freeze the header and left 3 columns. Please Help if there is any directive to do the same. I have tried all options available in net using CSS and jquery plugin but in vein. Please help

1

1 Answer 1

1

div {
    width: 300px;
    overflow-x:scroll;
    margin-left:50px;
    overflow-y:visible;
    padding-bottom:1px;
}
td {
    padding: 0 40px;
    
}

table tr td:first-child{
  position:absolute;
  width:50px; 
  left:0;
}
<div>
    <table>
        <tr>
            <td></td>
            <td>Walter</td>
            <td>Mike</td>
            <td>Nancy</td>
        </tr>
        <tr>
            <td>Age</td>
            <td>30</td>
            <td>20</td>
            <td>10</td>
        </tr>
        <tr>
            <td>Gender</td>
            <td>Male</td>
            <td>Female</td>
            <td>Male</td>
        </tr>
        <tr>
            <td>Company</td>
            <td>ABC</td>
            <td>BBC</td>
            <td>BFG</td>
        </tr>
    </table>
</div>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.