example_02_position.html 692 Bytes
Newer Older
nilsl's avatar
add  
nilsl committed
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
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <title>Hello, positions!</title>
    <meta name="description" content="A HTML document demonstrating positioning.">
	<style>
		.container-outer {
		  position: relative;
		  top: 10px;
		  width: 100%;
		  height: 90px;
		  background-color: blue;
		}

		.container-inner {
		  position: absolute;
		  top: 50px;
		  right: 50px;
		  width: 100%;
		  height: 30px;
		  background-color: yellow;  
		}
	</style>
  </head>
  <body>
	<div class="container-outer">
		<div class="container-inner">
		</div>
	</div>
  </body>
</html>