Selected from Linux Selected from PHP
- Ubuntu 17.10 Install google's mod pagespeed for apache - PHP-Ubuntu-Youtube-dl simple script for converting and downloading youtube video or mp3
- Ubuntu SSH tunnel via proxy - PHP while loop with every row with a different color
- Install GoAccess Apache Log Analyzer Tool on Ubuntu 17.10 - PHP use while loop in function
- SSHFS and map folder with a proxy - PHP List Files And Folders As links
- How to connect to SSH server with a proxy - PHP Extract Text From String
➥ Създаване на HTML таблица с различни цветове за всеки ред
Added by sonik on 02-05-2017 and keywords: html, table, different, row, color, td, tr, th, хтмл, различен, цвят, всеки, ред [ Print Article ]
Чрез тази методика си спестяваме писането на php код за всяка наша таблица и унифицираме страниците си.



<!DOCTYPE html>
<html>
<head>
<style>
table {
   font-family: arial, sans-serif;
   border-collapse: collapse;
   width: 100%;
}

td, th {
   border: 1px solid #dddddd;
   text-align: left;
   padding: 8px;
}

tr:nth-child(even) {
   background-color: #dddddd;
}
</style>
</head>
<body>

<table>
 <tr>
   <th>Company</th>
   <th>Contact</th>
   <th>Country</th>
 </tr>
 <tr>
   <td>Alfreds Futterkiste</td>
   <td>Maria Anders</td>
   <td>Germany</td>
 </tr>
 <tr>
   <td>Centro comercial Moctezuma</td>
   <td>Francisco Chang</td>
   <td>Mexico</td>
 </tr>
 <tr>
   <td>Ernst Handel</td>
   <td>Roland Mendel</td>
   <td>Austria</td>
 </tr>
 <tr>
   <td>Island Trading</td>
   <td>Helen Bennett</td>
   <td>UK</td>
 </tr>
 <tr>
   <td>Laughing Bacchus Winecellars</td>
   <td>Yoshi Tannamuri</td>
   <td>Canada</td>
 </tr>
 <tr>
   <td>Magazzini Alimentari Riuniti</td>
   <td>Giovanni Rovelli</td>
   <td>Italy</td>
 </tr>
</table>

</body>
</html>

@All rights reserved with Copyright Webleit.info 2018 by Sonik_Blast [ Site Map ] [ RSS ] [ YouTube Mp3 Downloader and converter ]