1.right {
2 position: fixed; /* the fixed pos makes it work */
3 right: /*how much you want to move it right
4 put % or px or rem at end of the amount */;
5}
1<html>
2 <head>
3 </head>
4
5 <body>
6 <div style = "position:relative; left:80px; top:2px; background-color:yellow;">
7 This div has relative positioning.
8 </div>
9 </body>
10</html>
1<!DOCTYPE html>
2<html>
3<head>
4<meta charset=utf-8 />
5<title>Test</title>
6<style>
7 #foo {
8 position: fixed;
9 bottom: 0;
10 right: 0;
11 }
12</style>
13</head>
14<body>
15 <div id="foo">Hello World</div>
16</body>
17</html>
1h2.pos_left {
2 position: relative;
3 left: -20px;
4}
5
6h2.pos_right {
7 position: relative;
8 left: 20px;
9}
1.right {
2 position: fixed; /* the fixed pos makes it work */
3 left: /*how much you want to move it left
4 put % or px or rem at end of the amount */;
5}