Home arrow DHTML arrow Page 5 - Text-Justify, Volume, and Other Style Sheet Properties
DHTML

Text-Justify, Volume, and Other Style Sheet Properties


In this conclusion to a ten-part series on style sheet properties, you'll learn about things you can do with text, how to set the width of an element, and more. This article is excerpted from chapter four of Dynamic HTML: The Definitive Reference, Third Edition, written by Danny Goodman (O'Reilly; ISBN: 0596527403). Copyright 2006 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

Author Info:
By: O'Reilly Media
Rating: 5 stars5 stars5 stars5 stars5 stars / 13
November 01, 2007
TABLE OF CONTENTS:
  1. · Text-Justify, Volume, and Other Style Sheet Properties
  2. · Text-transform
  3. · Vertical-align
  4. · Volume
  5. · Word-break
  6. · Writing-mode

print this article
SEARCH DEVARTICLES

Text-Justify, Volume, and Other Style Sheet Properties - Word-break
(Page 5 of 6 )

word-break
IE 5(Win) NN n/a Moz all Saf all Op all CSS n/a

Inherited: No

Controls the word-break style for ideographic languages or content that mixes Latin and ideographic languages.

CSS Syntax

word-break: breakType

Value                   One of the following constant values: break-all | keep-all | normal.

Initial Value         normal

Example               div {word-break: keep-all}

Applies To            Block-level and table-related elements .

Object Model Reference

[window.]document.getElementById("elementID").style.wordBreak

word-spacing
IE 4(Mac)/6(Win) NN n/a Moz all Saf all Op all CSS 1

Inherited: Yes

Sets the spacing between words when the text is not under external word-spacing constraints (e.g., an align property set to justify ). IE 5 for Macintosh may exhibit overlap problems with the word-spacing of elements nested inside the one being controlled.

CSS Syntax

word-spacing: length | normal

Value

A value of normal lets the browser handle word spacing according to its rendering calculations. See the discussion about length values at the beginning of this chapter.

Initial Value            normal

Applies To               All elements.

Object Model Reference

[window.]document.getElementById("elementID").style.wordSpacing

word-wrap
IE 5.5 NN n/a Moz n/a Saf 1.3/2 Op n/a CSS n/a

Inherited: Yes

Specifies word-wrapping style for block-level, specifically-sized inline, or positioned elements. If a single word (i.e., without any whitespace) extends beyond the width of the element containing box, the normal behavior is to extend the content beyond the normal box width, without breaking. But with the value of break-word , you can force the long word to break at whatever character position occurs at the edge of the box.

CSS Syntax

word-wrap: wrapStyle

Value                   One of the constant values: break-word | normal.

Initial Value         normal

Applies To            Block-level, sized inline, and positioned elements .

Object Model Reference

[window.]document.getElementById("elementID").style.wordWrap


blog comments powered by Disqus
DHTML ARTICLES

- Text-Justify, Volume, and Other Style Sheet ...
- Ruby-Position, Size, and Other Style Sheet P...
- Padding, Pages, and More Style Sheet Propert...
- Marks, Orphans, and More Style Sheet Propert...
- Layouts, Margins, and Other Style Sheet Prop...
- Floats, Fonts, and Other Style Sheet Propert...
- Color, Filters, and Other Style Sheet Proper...
- Borders and More with Style Sheets
- Learning Style Sheet Properties
- Style Sheet Property Reference
- Completing a Noisy Image Application
- An Object-Based Approach to Building Noisy I...
- A Basic Method for Building Noisy Images
- Adding More Features to Sliders with the Scr...
- Using Sliders with the Scriptaculous Framewo...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials