Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .parent1{
- width: 300px;
- height: 300px;
- background: black;
- }
- .chield1{
- background: orange;
- width: 100px;
- height: 100px;
- }
- /*metod 1*/
- .p1{
- position: relative;
- }
- .c1 {
- position: absolute;
- /*top: 50%;*/
- left: 50%;
- transform: translate(-50%, 0);
- }
- /*metod 2*/
- .p2 {
- position: relative;
- }
- .c2 {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto;
- }
- .p3 {
- position: relative;
- }
- .c3 {
- position: absolute;
- inset: 0;
- margin: auto;
- }
- .p4 {
- display: flex;
- justify-content: center;
- /*align-items: center;*/
- }
- .c4 {
- align-self: center;
- }
- .p5 {
- display: flex;
- }
- .c5 {
- margin: auto;
- }
- .p6 {
- display: grid;
- justify-content: center;
- align-items: center;
- }
- .c6 {
- }
- .p7 {
- display: grid;
- place-items: center;
- }
- .c7 {
- }
- .p8 {
- display: grid;
- }
- .c8 {
- align-self: center;
- justify-self: center;
- }
- .p9 {
- display: grid;
- }
- .c9 {
- place-self: center;
- }
- .p10 {
- display: grid;
- }
- .c10 {
- margin: auto;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement