CSS Vertical align/ text-align, combinators Flashcards
What is the difference text-align and vertical-align?
Text-align decides the position in the DIV. e.g text-align: center;
Vertical-align decides on the position within the line it’s in in inline-block;
What does margin: auto; do?
Here’s what margin: auto; does:
Horizontal centering: It sets the left and right margins of the element to automatically adjust to evenly distribute the available space. This effectively centers the element horizontally within its container.
Equal margins: It ensures that the left and right margins are equal. This creates a symmetrical spacing around the element.
How to make a square with border-radius?
50%
What are the ‘arguments’ for border to make colour, solid width etc shorthand?
.element {
border: 2px solid red;
}
What does this mean? margin: 0 16px;
margin-top: 0;
margin-right: 16px;
margin-bottom: 0;
margin-left: 16px;