کمپاریشن تھیبل بنانے کا طریقہ:
کمپاریشن تھیبل بنانے کا طریقہ سیکھیں
Features | Basic | Pro |
---|---|---|
Sample text | ||
Sample text | ||
Sample text | ||
Sample text | ||
Sample text |
کمپاریشن تھیبل بنانے کا طریقہ
پہلی قدم - ایچ تی ایم ایل کو شامل کریں:
<!-- فون آف اینٹرنیشنل ایکونو میکا --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <table> <tr> <th style="width:50%">Features</th> <th>Basic</th> <th>Pro</th> </tr> <tr> <td>Sample text</td> <td><i class="fa fa-remove"></i></td> <td><i class="fa fa-check"></i></td> </tr> <tr> <td>Sample text</td> <td><i class="fa fa-check"></i></td> <td><i class="fa fa-check"></i></td> </tr> </table>
دوسری قدم - سی ایس ایس کو شامل کریں:
/* تھیبل کے ستایل کو سٹ کریں */ table { border-collapse: collapse; border-spacing: 0; width: 100%; border: 1px solid #ddd; } /* ستایل تھیبل ہیڈنگ اور تھیبل ڈاٹا کو سٹ کریں */ th, td { text-align: center; padding: 16px; } th:first-child, td:first-child { text-align: left; } /* بندری بارنگی تھیبل رینج */ tr:nth-child(even) { background-color: #f2f2f2 } .fa-check { color: green; } .fa-remove { color: red; }