Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

CSS: Fonts and Text : Page 6

Learn all kinds of things about altering fonts and text.


advertisement
Text Indent: <{text-indent: XXunits/%}
The text-indent property controls the amount of indent for the first line of the text element.

Example:

p {text-indent: 2em}



If you are using a CSS-enabled browser, this paragraph's first line is indented 2 em spaces. Change the point size and the indent will adapt to the new size.

P {text-indent: 72pt}

If you are using a CSS-enabled browser, this paragraph has a first line that is indented 72 points.

blockquote {text-indent: -5%}

If you are using a CSS-enabled browser, this blockquote's first line is indented a -5%, creating a slight hanging indent.

For Horizontal Alignment: {text-align: left/right/center/justify}
The text-align property aligns the element horizontally across the page or within the division.

Example:

p {text-align: right}

If you are using a CSS-enabled browser, this paragraph is aligned to the right side of the browser window page. Each line within the paragraph is "flush right," abutting the right margin.

P {text-align: center}

If you are using a CSS-enabled browser, this paragraph is centered. Every line in the paragraph is centered across it container, whether that is the page or a division within the page.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date