Jumat, 08 April 2016

Membuat Tabel CSS


<html>
<head>
 <title>TABLE CSS</title>
</head>
<style>
 a{
  border: 1px solid red;
  padding: 5px 10px;
  background-color:grey;
  color: black;
  font-weight: bold;
  font-family: arial;
  text-decoration: none;
  border-radius: 5px;
  display: block;
  width: 150px;
  text-align: center;

 }
 a:hover{
  color: black;
  background-color: skyblue;

 }
 a:active{
  background-color: red;
  
 }

 table {
  border-collapse: collapse;
  width: 500px;
  margin: 25px;
  font-family: arial;
 }

tr, td {
 border: 1px solid red;
}



 .no1{
  background-color: cyan;
  border-radius: 8px 8px 0px 0px;
  border: 2px solid white;
  



 }
 .no2{
  background-color: white;
  
 }
 .no2:hover{
  background-color: grey;
 }

 .no3{
  background-color: skyblue;
 }
 .no3:hover{
  background-color: red;
 }
 .no5{
  border: 2px solid cyan;
 }
</style>
<body>

<a href="MP.html">Klik</a>

<table border="0">
 <th class="no1">No</th>
 <th class="no1">NIM</th>
 <th class="no1">Nama Lengkap</th>
 
 <tr class="no2">
  <td>1</td>
  <td>20151210</td>
  <td>Bandi</td>
 </tr>

 <tr class="no3">
  <td>2</td>
  <td>201512020</td>
  <td>Rulya Robbal</td>
 </tr>

 <tr class="no2">
  <td>3</td>
  <td>201512030</td>
  <td>Dimas</td>
 </tr>

 <tr class="no3">
  <td>4</td>
  <td>201512040</td>
  <td>Satria</td>
 </tr>

 <tr class="no2">
  <td>5</td>
  <td>201512050</td>
  <td>Driyo</td>
 </tr>

 <tr class="no3">
  <td>6</td>
  <td>201512060</td>
  <td>Sukkri</td>
 </tr>
</table>
</body>
</html>


Contoh Hasil Tabel CSS










Tidak ada komentar:

Posting Komentar