Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Best and Worst Ways to Center Without Flex or Grid

Kevin Powell via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore various techniques for centering elements in CSS without using flexbox or grid in this informative video tutorial. Learn five different methods including line-height, tables, two variations of absolute positioning, and padding with custom properties. Discover the pros and cons of each approach as you enhance your CSS skills for creating centered layouts. Follow along with timestamps for easy navigation through each technique and gain practical insights to improve your web design capabilities.

Syllabus

- Introduction
- The criteria
- Technique #1 - line-height
- Technique #2 - tables
- Technique #3 - position absolute v1
- Technique #4 - position absolute v2
- Technique #5 - padding with custom properties

Taught by

Kevin Powell

Reviews

Start your review of Best and Worst Ways to Center Without Flex or Grid

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.