cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div id="wrap">
  
  <h1>Responsive <span>Table</span> Layout Sample</h1>
  <p class="description">レスポンシブデザインのテーブルレイアウト例</p>
  
  <div class="tableBlock pattern01">
  <table>
    <caption>レスポンシブテーブル パターン1:単純に幅可変</caption>
    <tbody>
    <tr>
      <th>見出し1</th>
      <td>テキスト1-1</td>
      <td>テキスト1-2</td>
    </tr>
    <tr>
      <th>見出し2</th>
      <td>テキスト2-1</td>
      <td>テキスト2-2</td>
    </tr>
    <tr>
      <th>見出し3</th>
      <td>テキスト3-1</td>
      <td>テキスト3-2</td>
    </tr>
    </tbody>
  </table>
  <!-- /.tableBlock pattern01 --></div>
    
<!-- /#wrap --></div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Righteous);

#wrap {
  margin:2em auto;
  font-family: Arial, Roboto, “Droid Sans”, “游ゴシック”, YuGothic, “ヒラギノ角ゴ ProN W3”, “Hiragino Kaku Gothic ProN”, “メイリオ”, Meiryo, sans-serif;
  max-width:960px;
}
h1, h2 {
  text-align:center;
  font-family: 'Righteous', cursive;
}
h1 {
  font-size: 2.5em;
}
h1 span {
  color:#ffc045;
}
p.description {
  margin-top: 1em;
  letter-spacing:2px;
  text-align:center;
}
.btnList {
  margin-top: 2em;
  text-align:center;
}
.btnList li {
  display:inline-block;
}

/* 基本スタイル */
.tableBlock {
  margin-top:2em;
}
table {
  width:100%;
  table-layout:fixed;
  -webkit-box-sizing:border-box;
  box-sizing:border-box;
  border:1px solid #cfcfcf;
}
table caption {
  padding:1em;
  line-height: 1.5;
  text-align: left;
  background:#ffc045;
}
table tr th {
  background:#f2f2f2;
}
table tr th,
table tr td {
  padding:1em;
  line-height: 1.5;
  text-align:left;
  border:1px solid #cfcfcf;
}



            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console