summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins.html
blob: 98cd16c7c147316669eb6c456538f43ae90fbf44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<title>legend block margins</title>
<link rel=match href=legend-block-margins-ref.html>
<style>
 body { margin: 0; }
 fieldset { margin: 1em; border: 1em solid green; padding: 0; background: white; }
 legend { margin: 1em 1em 2em 1em; height: 1em; padding: 0; }
 .inner { margin: 1em; height: 1em; }
 .behind { position: absolute; left: 1em; right: 1em; margin-top: 1em; height: 7em; background: red; z-index: -1; }
</style>
<p>There should be no red.</p>
<div class=behind></div>
<fieldset>
  <legend>X</legend>
  <div class=inner>Y</div>
</fieldset>