Warning: Undefined array key "StartingPoint" in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 107 Warning: Cannot modify header information - headers already sent by (output started at /customers/f/f/0/safaribears.de/httpd.www/content.php:107) in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 115 Warning: Undefined variable $WEB_ROOT in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 118 Warning: Cannot modify header information - headers already sent by (output started at /customers/f/f/0/safaribears.de/httpd.www/content.php:107) in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 118 Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /customers/f/f/0/safaribears.de/httpd.www/content.php on line 169 CSS Tutorial - Positioning - text-align

Text-align decides upon the horizontal aligning of text. This applies on any text in any containing block element (like a <div> or <p>, and also in table cells.

This box has the parameter text-align:left; which results (as we can see) in the text having the normal flow, aligning to the left side of the <div>
div{
text-align:left;
}
This box has the parameter text-align:right; which results (as we can see) in the text aligning to the left right of the <div>
div{
text-align:right;
}
This box has the parameter text-align:center; which results (as we can see) in the text being centered within <div>
div{
text-align:center;
}
This box has the parameter text-align:justify; which results (as we can see) in the text aligning to the left and the right of the <div>
div{
text-align:justify;
}