>> English << | česky | PortuguêsZVON > Tutorials > CSS2 tutorial
>> Example 29 << | Prev | Next | Index | Contents

The text-align describes how inline content of a block element is aligned.

XML SourceCSS stylesheetExample link
(1)
     <AAA>
          <html:div b = "b">bbb bbb bbb</html:div>
          <html:div c = "c">ccc ccc ccc</html:div>
          <html:div d = "d">ddd ddd ddd</html:div>
          <html:div e = "e">eeeeee eeeeee eeeeee eeeeee eeeeee eeeeee eeeeee eeeeee eeeeeeeeeee eeeeee eeeeee eeeee</html:div>
          <html:div f = "f">ffffff ffffff ffffff ffffff ffffff ffffff ffffff ffffff ffffffffffff ffffff ffffff ffffff ffffff ffffff ffffff ffffff ffffff</html:div>
     </AAA>

div[b] {text-align: left}
div[c] { text-align: right }
div[d] { text-align: center }
div[f] {text-align: justify}
View output