Apps Scriptリファレンス: Apps Script Reference |障害・課題追跡: IssueTracker |Google Workspace: Status Dashboard - Summary

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>



Latest post

Google Formsで記述式の質問に字数制限を設定したい

記述式の質問には「回答の検証」を設定することができます フォームの編集画面 右下の︙メニューで「回答の検証」を選択します 検証方法には「数値」「テキスト」「長さ」「正規表現」という種類があります 今回は字数制限したいので「長さ」を選びます 長さには「最大文字数」か「最小文字数」を...