Skip to content

skriptxadmin/youtube-tutorials

Repository files navigation

Skriptx Youtube Tutorials Repository

Centering a child div to parent div

Table Cell Method: Use display: table on the parent and display: table-cell, vertical-align: middle, and text-align: center on the child to center it both vertically and horizontally.

Position Method: Set the parent to position: relative and the child to position: absolute, then use top: 50%, left: 50%, and transform: translate(-50%, -50%) on the child to center it.

Flexbox Method: Apply display: flex, justify-content: center, and align-items: center to the parent to center the child both vertically and horizontally.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages