Tabell - skjul kolonne

In this example below you will see how to do a Tabell - skjul kolonne with some HTML / CSS and Javascript

Skjule en kollone dersom vinduet er smalt

Thumbnail
This awesome code was written by morten-profundo, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright morten-profundo ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Tabell - skjul kolonne</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <table>
  <tr>
    <td>En</td><td>To</td><td>Tre</td>
  </tr>
  <tr>
    <td>En</td><td>To</td><td>Tre</td>
  </tr>
</table>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/morten-profundo/tabell-skjul-kolonne-aAFHo */
table {border-collapse: collapse; width: 100%}
td {border: 1px solid #666; font-size: 200%}
@media (max-width: 400px){
  td:nth-child(2) {display:none}  
}

Comments