テーブルの最近のブログ記事

php table パッディング

| コメント(0)

<td width="450" style="border:0;padding-top:10px;padding-bottom:10px;">

php ボーダーなしテーブル

| コメント(0)
<table style="border:0;">
<td style="border:0;">
    作業中テーブル名
</td>
<td style="border:0;">
     <h4>棚卸作業画面</h4>
</td>
</table>

php html 定番tableスタイル

| コメント(0)
<table>
    <tr>   
      <td valign="top">
          <table>
              <tr>
                  <th>**********</th>
                  <th>**********</th>
                  <th>**********</th>
                  <th>**********</th>
              </tr>
              <tr>
                      <td width="125" align="center">
                          
                      </td>
                      <td width="125" align="center">
                          
                       </td>
                      <td width="125" align="center">
                          
                      </td>
                      <td width="125" align="center">
                          
                      </td>
              </tr>
         </table>
      </td>
    </tr>
</table>

php html tableの結合

| コメント(0)
<td rowspan="2">//テーブル結合縦
<th colspan="2">//テーブル結合横、TH一つにTD二つが入る

php テーブルに交互に色を付ける

| コメント(0)
    /* 奇数行の背景色を変更 */
table.std tr:nth-child(odd) td {
      background-color: #eee;
    }
 
    /* 偶数行の背景色を変更 */
 table.std tr:nth-child(even) td {
      background-color: #eee;
    }
  
    /* 任意の行数毎に背景色を変更(この例だと4nと指定しているので4行ごと) */
table.std tr:nth-child(4n) td {
      background-color: #eee;
    }
<table class="std">

php ボックス・テーブル色付

| コメント(0)

<input type="text" style="font-size:20px; background-color:#cece31" size="5" name="score" value=''>

$tempHtml = "<td style=background-color:#cece31; width: 6%; align='left';>".$row["request"]."</td>";

//条件で色付

if($row["deliveryd_bf"] <= "$datee"){

  $tempHtml .= "<td style=background-color:#cece31; width: 6%; align='left';>".$row["deliveryd_bf"]."</td>";

}else{

  $tempHtml .= "<td style='width: 6%;' align = 'left'>".$row["deliveryd_bf"]."</td>";
}
 
<td style=background-color:#cece31; width: 6%; align='left';>//テーブルの色・幅
 
<!----------
 
<style type="text/css">
.tbl1{
  width: auto;
  height: auto;
  border-top: 8px solid #ff00ff;
  border-bottom: 8px solid #ff00ff;
  border-left: 1px solid #ff00ff;
  border-right: 1px solid #ff00ff;
}
.tbl2{
  width: auto;
  height: auto;
  border-top: 8px solid #d8b5b5;
  border-bottom: 8px solid #d8b5b5;
  border-left: 1px solid #d8b5b5;
  border-right: 1px solid #d8b5b5;
}
</style>
 
 
<form action="index.php" method="post">
    <input type="hidden" name="prefAdd" value="?= $prefAdd ?>">
<table class="tbl2">
<tr>
        <th>ID</th><th>URL</th><th>MEMO</th><th>操作</th>
    </tr>
    <tr>
        <td></td>
        <td><input type="text" size="70" name="urladd" style="ime-mode:disabled"></td>
        <td><input type="text" size="50" name="memo"></td>
        <td><input type="submit" name="submit" value="追加"></td>
    </tr>
</table>
</form>
 
<hr>
 
<table class="tbl1">
    <tr>
      <td valign="top">
          <table>
              <tr>
                  <th>ページ</th>
                  <th>ページ</th>
                  <th>ページ</th>
                  <th>ページ</th>
                  <th>ページ</th>
                  <th></th>
              </tr>
              <tr>
                      <td width="125" align="center">
                       <form name="form" action="" method="post">
                       <input type="submit" name="submit" value="実行">
                       </form>
                      </td>
                      <td width="125" align="center">
                         <form name="form" action="" method="post">
                         <input type="submit" name="submit" value="実行">
                         </form>
                       </td>
                      <td width="125" align="center">
                         <form name="form" action="" method="post">
                         <input type="submit" name="submit" value="実行">
                         </form>
                      </td>
                      <td width="125" align="center">
                         <form name="form" action="" method="post">
                         <input type="submit" name="submit" value="実行">
                         </form>
                      </td>
                      <td width="250" align="center">
                          <form name="form" action="" method="post">
                          <input type="submit" name="submit" value="実行">
                          </form>
                      </td>
                      <td width="125" align="center">
                          <form name="form" action="" method="post">
                          <input type="submit" name="submit" value="実行">
                          </form>
                      </td>
              </tr>
         </table>
      </td>
    </tr>
</table>
<script src="/gateway/js/shopcalcu.js" type="text/javascript"></script><!-ファイル読込時数値の色変更処理自作->
<script src="/gateway/js/real.time.js" type="text/javascript"></script><!-自作->
 
 

HTML TABLE オプション

| コメント(0)
<table style="width:2000px;">
<table style="border:0;">
 
<table>
 <caption>タイトル</caption>
 
<td valign="top">
 
<td align = 'right'>".number_format($row["price"])."</td>
 
<td style="background-color:#cece31;"></td>
<td style=background-color:#cece31; width: 20px; align='left';>
 
<td rowspan="2">//テーブル結合
<td colspan="2">//テーブル結合
<td style="border:0;">
 
 <th style="width: 20px;">
 
<table>
    <tr>
        <td valign="top">
              
        </td>
         
        <td valign="top">
              
       </td>               
    </tr>        
</table>