| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>030 table rowspan</title>
- <style>
- html, body { margin: 0; padding: 0; background: #ffffff; color: #202020; }
- body { font-family: sans-serif; font-size: 13px; }
- h1 { font-size: 20px; margin: 10px 0 4px 10px; }
- p { margin: 0 0 10px 10px; }
- .pane { float: left; width: 440px; margin-left: 10px; }
- .label { background: #eeeeee; padding: 4px 6px; margin-bottom: 4px; }
- .stage { background: #ffffff; padding: 8px; border: 1px solid #999999; }
- td { padding: 0; }
- .red { background: #cc3333; }
- .blue { background: #2244cc; }
- .green { background: #22aa44; }
- .cover { position: relative; width: 300px; height: 70px; }
- .box { position: absolute; }
- .after { background: #333333; color: #ffffff; height: 24px; margin-top: 8px; padding-left: 4px; }
- </style>
- </head>
- <body>
- <h1>030 · table rowspan</h1>
- <p>The red cell must span both rows (70 px), beside a 30 px blue cell and a 40 px green cell.</p>
- <div class="pane">
- <div class="label">A: rowspan=2</div>
- <div class="stage">
- <table style="width: 300px">
- <tr><td class="red" rowspan="2" style="width: 100px"></td><td class="blue" style="height: 30px"></td></tr>
- <tr><td class="green" style="height: 40px"></td></tr>
- </table>
- <div class="after">after</div>
- </div>
- </div>
- <div class="pane">
- <div class="label">B: absolute reference</div>
- <div class="stage">
- <div class="cover">
- <div class="box red" style="left: 0; top: 0; width: 100px; height: 70px"></div>
- <div class="box blue" style="left: 100px; top: 0; width: 200px; height: 30px"></div>
- <div class="box green" style="left: 100px; top: 30px; width: 200px; height: 40px"></div>
- </div>
- <div class="after">after</div>
- </div>
- </div>
- </body>
- </html>
|