Back to lesson
1. How can we center an image with display?
Change the image to display: block and give it a margin: auto.
Give it a display: inline-block;
2. How can we center some text inside a class using line-height?
Set line-height equal to the height of the div, then text-align: center;
Set the line-height equal to the div width.
Set line-height equal to the height of the div.
3. How can we align a thing using position?
By giving it a position: absolute, and then tweaking top, left, or right to put it where we want.
By using position: fixed.
Back to the top
© 2017 GoSkills Ltd.
Skills for career advancement