Both parent and child modules are absolute
Explanation parent module:
- The parent module, based on the top left corner of the page, moves 50px down and 100px to the right;
- The width of the module depends on the length of the content;
- Nor does it crowd out the space of other modules;
Explanation sub-module:
- The child module, based on the top left corner of the parent module, moves down 10px and to the right 10px;
- The width of the module is set independently of the parent module and defaults to the length of the text
- Nor does it crowd out the space of other modules;
The parent module is absolute and the child module is relative
Explanation parent module:
- The parent module, based on the top left corner of the page, moves 50px down and 100px to the right;
- The width of the module depends on the length of the content;
- Nor does it crowd out the space of other modules;
Explanation sub-module:
- Submodule, based on the content in the upper left corner of the parent module, remove the line height of the content and move it 10px down and 10px to the right;
- The width of the module is set independently of the parent module and defaults to the length of the text
- Nor does it crowd out the space of other modules;
The parent module is relative and the child module is relative
Explain the parent module relative:
- The parent module will be moved 50px to the right and 100px to the bottom of its original second div module.
- The width of the module can be set independently;
- Nor does it crowd out the space of other modules;
Interpretation submodule relative:
- Submodule, based on the content in the upper left corner of the parent module, remove the line height of the content and move it 10px down and 10px to the right;
- The width of the module is set independently of the parent module;
- Nor does it crowd out the space of other modules;
The parent module is relative and the child module is absolute
Explain the parent module relative:
- The parent module will be moved 50px to the right and 100px to the bottom of its original second div module.
- The width of the module can be set independently;
- Nor does it crowd out the space of other modules;
Interpretation submodule relative:
- The child module, based on the top left border of the parent module, moves 10px down and 10px to the right;
- The width of the module is set independently of the parent module and defaults to the length of the text
- Nor does it crowd out the space of other modules;