Css white space pre line height
Zero out your margin on the element, and put a Show I prefer using So to control line-height when using
The The property specifies two things: Syntax
The Values
Sequences of white space are collapsed. Newline characters in the source are handled the same as other white space. Lines are broken as necessary to fill line boxes. nowrap Collapses white space as for pre Sequences of white space are preserved. Lines are only broken at newline characters in the source and at pre-wrap Sequences of white space are preserved. Lines are broken at newline characters, at pre-line Sequences of white space are
collapsed. Lines are broken at newline characters, at break-spaces The behavior is identical to that of
The following table summarizes the behavior of the various Note: There is a distinction made between spaces and other space separators. These are defined as follows: spacesSpaces (U+0020), tabs (U+0009), and segment breaks (such as newlines). other space separatorsAll other space separators defined in Unicode, other than those already defined as spaces. Where white space is said to hang, this can affect the size of the box when measured for intrinsic sizing. Collapsing of white spaceThe CSS Text specification contains a Collapsing and Transformation section that precisely defines what "white space is collapsed" means, including an example with an illustration. Usually, it means reducing sequences of multiple white-space characters down to a single space character — though in some cases it means reducing them to no character (the empty string). Formal definitionFormal syntaxwhite-space = ExamplesBasic example
Line breaks inside |
Specification |
---|
Unknown specification # white-space-property |
Browser compatibility
BCD tables only load in the browser
See also
- Properties
that define how words break within themselves:
overflow-wrap
,word-break
,hyphens