Update snippet structure

This commit is contained in:
Angelos Chalaris
2019-08-22 12:30:43 +03:00
parent ae9eaee179
commit 343f8fd4c7
46 changed files with 276 additions and 92 deletions

View File

@ -1,4 +1,7 @@
### Transform centering
---
title: Transform centering
tags: layout,intermediate
---
Vertically and horizontally centers a child element within its parent element using `position: absolute` and `transform: translate()` (as an alternative to `flexbox` or `display: table`). Similar to `flexbox`, this method does not require you to know the height or width of your parent or child so it is ideal for responsive applications.
@ -43,4 +46,5 @@ Note: Fixed height and width on parent element is for the demo only.
- https://caniuse.com/#feat=transforms2d
<!-- tags: layout -->