LANG SELRCT

Google Apps Scriptのコードを書く場所  (新規作成: スプレッドシート | スクリプトエディタ

2020年1月12日日曜日

テーブルのセルの最小値を設定したい(min-width: 240px)


セルの幅の最小値をmin-widthで設定してみる

th, td {
  min-width: 360px;
  border: solid 1px lightgray;
}




コード.gs
function doGet() {
  return HtmlService.createHtmlOutputFromFile("index");
}
意訳
この機能がやること
指定したHTMLファイルを表示する




index.html
<!DOCTYPE html>
<html>

<head>
<style>
table {
  border-collapse: collapse;
}

th, td {
  min-width: 360px;
  border: solid 1px lightgray;
}
</style>
</head>

<body>
  <table>
    <tbody>
      <tr>
        <th>caption1</th>
        <th>caption2</th>
        <th>caption3</th>
      </tr>
      <tr>
        <td>1-1 Practice makes the impossible possible.</td>
        <td>1-2 Take your time.</td>
        <td>1-3 Strile while the iron is hot.</td>
      </tr>
      <tr>
        <td>2-1</td>
        <td>2-2</td>
        <td>2-3</td>
      </tr>
      <tr>
        <td>3-1</td>
        <td>3-2</td>
        <td>3-3</td>
      </tr>
    </tbody>
  </table>
</body>
</html>



最新の投稿

JIRA APIで選択リスト(複数選択)を作成時に選択してPOSTしたい

JIRA APIを利用して選択リスト(複数選択)フィールドに値を入れたくて書いたコードです。 コード.gsのこの部分で複数選択の値を選択できました。 customfield_10043 は選択リスト(複数選択)のフィールドIDです。 valueの値は選択肢の文字列です。     ...