Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
class TestContainingBlockAbsolute extends GenericTest {
4
  function TestContainingBlockAbsolute1() {
5
    $tree = $this->runPipeline('
6
<style type="text/css">
7
#container {
8
  padding: 10mm;
9
  margin: 50mm;
10
  position: relative;
11
  top: 0;
12
  left: 0;
13
}
14
 
15
#block {
16
  position: absolute;
17
  top: 3mm;
18
  left: 2mm;
19
  margin: 7mm;
20
}
21
</style>
22
<div id="container">
23
<div id="block">
24
&nbsp;
25
</div><!--#block-->
26
</div><!--#container-->
27
');
28
 
29
    $block     =& $tree->get_element_by_id('block');
30
    $container =& $tree->get_element_by_id('container');
31
 
32
    $this->assertEqual($block->get_top_margin(), $container->get_top_padding() - mm2pt(3));
33
    $this->assertEqual($block->get_left_margin(), $container->get_left_padding() + mm2pt(2));
34
  }
35
}
36
 
37
?>