Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下の画像のように、そのダイビングのバナーのようにテキストが表示されるタイトルを追加しようとしています。
問題は、CSS でタイトル テキストを設定する必要があることです。その中にコンテンツを含む単一のdivがあります。HTMLコードを変更して何かを追加することはできません。
何か案は?
before次のような疑似要素でそれを行うことができます:
before
.your_div:before { content: "Your DIV title"; display: block; color: #000; background: #CCC; text-align: center; }
ただし、古いブラウザには対応していません。
それが理にかなっていれば、テーブルをテーブルの中に入れて、全体の高さの 100% に広げようとしています。
<table width="800" border="2"> <tr> <td width="66%"> box 1 </td> <td width="10" rowspan="2" /&g