user1760110
user1760110

Reputation: 2336

Issue on setting tr Height on CSS

I am trying to set height for <tr> element of table as below but it is not working

.tsx tr { line-height: 20px; }

<table class="tsx">
<tr></tr>

Can you please let me know what I am doing wrong?

Upvotes: 0

Views: 53

Answers (1)

Sasmit
Sasmit

Reputation: 160

Tried your code and seems to be working fine. Try changing the line-height value. The value you are using (20px) may be equal to the default line-height value. Hence you may not be able to see the difference.

<html>
    <head>
        <style>
            .tsx tr { line-height: 25px; }
        </style>
    </head>
    <body>
        <table class="tsx" border="1">
            <tr>
                <td>abc</td>
            </tr>
        </table>
    </body>
</html>

Upvotes: 1

Related Questions