忘備録

日々の調べ物をまとめる。アウトプットする。基本自分用。

HTML

tr に min-height 当てたいけどできなかった時

td に height 当たればいいんじゃない? <html> <head> <style> table, td, th { border: 1px solid black; border-collapse: collapse; } td { height: 10px; } </style> </head> <body> <h1>Use "height" to td tag for height of tr tag instead of "min-height"</h1> <table> <caption>example</caption> <thead> </thead></table></body></html>

table内のリンクをセル全体に広げる方法

方法: aタグのstyleにdisplay: block; width: 100%; height: 100%を設定する ソース <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> table, td, th { border: 1px red solid; } a:hover { background-color:#ffcccc; } </style> </head> <body> …</body></html>