white-space
CSS white-space Property
The CSS white-space property is CSS shorthand logic for the text-space-collapse and text-wrap properties.
equal to = text-space-collapse: collapse; text-wrap: normal;
nowrap
equal to = text-space-collapse: collapse; text-wrap: none;
pre
equal to = text-space-collapse: preserve; text-wrap: none;
pre-line
equal to = text-space-collapse: preserve-breaks; text-wrap: normal;
pre-wrap
equal to = text-space-collapse: preserve; text-wrap: normal;
CSS CODE EXAMPLE
<!DOCTYPE html>
<style type="text/css">
#div2 { white-space: normal; }
#div2 { white-space: nowrap; }
#div3 { white-space: pre-line; }
.divClass { line-height:2em; background: #C1E0FF; border:#09F 1px solid; height:50px; }
</style>
<div id="div1" class="divClass">
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
</div>
<hr />
<div id="div2" class="divClass">
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
</div>
<hr />
<div id="div3" class="divClass">
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
</div>
<style type="text/css">
#div2 { white-space: normal; }
#div2 { white-space: nowrap; }
#div3 { white-space: pre-line; }
.divClass { line-height:2em; background: #C1E0FF; border:#09F 1px solid; height:50px; }
</style>
<div id="div1" class="divClass">
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
</div>
<hr />
<div id="div2" class="divClass">
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
</div>
<hr />
<div id="div3" class="divClass">
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
</div>
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
Possible Values:
normalequal to = text-space-collapse: collapse; text-wrap: normal;
nowrap
equal to = text-space-collapse: collapse; text-wrap: none;
pre
equal to = text-space-collapse: preserve; text-wrap: none;
pre-line
equal to = text-space-collapse: preserve-breaks; text-wrap: normal;
pre-wrap
equal to = text-space-collapse: preserve; text-wrap: normal;
0 Response to "white-space"
Post a Comment