summaryrefslogtreecommitdiff
path: root/Base/res/html/misc/position-absolute-from-edges.html
blob: e04ddf71ccdcdad223fa924cfe3cce123c57139d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<style>
#container {
    position: absolute;
    width: 500px;
    height: 400px;
    border: 1px solid black;
}
#red {
    position: absolute;
    left: 20px;
    top: 20px;
    background: red;
    width: 100px;
    height: 100px;
    border: 10px solid gray;
}
#green {
    position: absolute;
    right: 20px;
    top: 20px;
    background: green;
    width: 100px;
    height: 100px;
    margin: 50px;
}
#blue {
    position: absolute;
    left: 20px;
    bottom: 20px;
    background: blue;
    width: 100px;
    height: 100px;
}
#yellow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: yellow;
    width: 100px;
    height: 100px;
}
</style>
<div id=container>
    <div id=red></div>
    <div id=green></div>
    <div id=blue></div>
    <div id=yellow></div>
</div>