Text Position Css Code Example


Example 1: center text in css


.class {
text-align: center;
}

Example 2: text align justify


text-align: justify;

Example 3: what are the types of positioning in css


The types of positioning in CSS are-
1)static: this is the default value.
2)sticky: the element is positioned based on the user's scroll position.
3)fixed: the element is positioned related to the browser window.
4)relative: the element is positioned relative to its normal position.
5)absolute: the element is positioned absolutely to its first positioned parent.

Example 4: css text align right


body {
text-align: right;
}

Example 5: how to push text to the right css


padding-left: 3px;

Example 6: css text align left


body {
text-align: left;
}

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable