HTML CSS SQL Meta tag Generator ScrollBar design Generator Encode Decode images

CSS Basics

Introduction Syntax Selectors Attribute Selectors Specificity Combinators !important Comments Colors

CSS Need to Know

Box Model Pseudo-class Pseudo-element Inline-block Math Functions Max and Min Opacity Outline Overflow Z-index Float

Most used

Align Backgrounds Borders Text Units Padding Margins Position Tables Display Fonts Lists Height and Width

CSS Reference

CSS Properties reference CSS Pseudo-Classes reference CSS Pseudo-Elements reference CSS Selector reference
CSS vertical-align Tutorial

CSS vertical-align

The vertical-align property in CSS is used to vertically align elements. It can be applied to inline or inline-block elements within a container.

Here is an example of how the vertical-align property works:

Result:
This is vertically centered

In this example, the text "This is vertically centered" is vertically centered within the container by using the vertical-align: middle; property.

The vertical-align property can also take other values such as top, bottom, baseline, etc. Let's see another example:

Result:
Text aligned to the top

In this example, the text "Text aligned to the top" is aligned to the top of the container using the vertical-align: top; property.

.rap {
	word-spacing: 0;
}