Css primus transfer slіv. How to add for the help of the powers of CSS row transfer. Why do you have only one authority in other countries

Golovna / Usunennya malfunctions

When laying out webmasters, you periodically blame food: how will you transfer the text? In most cases, the browser independently copes with these tasks. In addition, sometimes the process is brought under control, especially shaping old words and phrases, which, if transferred incorrectly, lose sense.

Power word-wrap

HTML has a special tag for separating rows
. And yet, it is often necessary to slander among retailers in a filthy tone and often speak about unprofessionalism. As proof to show that you have a logo and you want the skin letter to start from a new row:

Translation of new words

Viyshov is a cumbersome and indulgent code, like a culture shock in a retailer. And how can you fix it, if you want, so that in the desktop version the logo will be displayed horizontally, and behind the screen width less than 550 pixels vertically? To that for nalashtuvannya sane looking Always select cascading stylesheet elements. Tim more, for additional tools CSS porting the rows are arranged in an elegant way. For this reason, do not blame the supra-mundane layout, as it changes the speed of the entanglement of the sides.

The first power, until the varto turn around for processing the text, ce word-wrap. It takes three values: normal, break-all and keep-all. For your work, you need to remember only break-all. Normal to stand behind the locks, and there is no way to tell the sensu. Keep-all means row wrapping in a CSS document. Broken down especially for Chinese, Japanese and Korean characters. Because you don't want to blog on your own, you don't need power. And also it is not supported by the Safari browser that mobile phones based on iOS.

Schob to the logo from the front butt help CSS transferring to a new row of skin letters, it is necessary to prescribe the next code:

P( font: bold 30px Helvetica, sans-serif; width: 25px; word-wrap: break-all; )

The width and size of the font are chosen in such a rank, so that there is only enough room for one letter. Word-wrap with break-all values ​​tells the browser that the word needs to be moved to a new row. It is impossible to name the irreplaceable power. Ale, you will be in good luck when you draw up small blocks with text, for example, fields for entering comments.

Power white-space

The pardon of web-retailers-pochatkivtsiv has been expanded - you can edit the text with spaces or by pressing the Enter key, and then wonder why your susilla is not visible on the side. Skіlki b you didn't push "Introduction", the browser doesn't ignore it. Ale є sposіb zmusit yogo vіdobrazhat text so, as you need, and taking all the intervals to respect.

In CSS documents, the shifting of the row, recognized for the additional power of white-space, can be adjusted in such a way that it would be changed with the improvement of spaces or the pressing of the "Introduction" key. White-space from pre-line values ​​Set the browser's bachity to the text Enter.

Translation of new words

If you change the pre-line to pre-wrap in CSS code, the line wrapping will be corrected for gaps. First of all, zaboroniti be-like transferring, having given the text the power of white-space with the meanings of nowrap:

#wrapper p( color: #FFF; padding: 10px; font: bold 16px Helvetica, sans-serif; white-space: nowrap; )

text-overflow

Another basic tool for working with text is text-overflow. Row wrapping cream, CSS power allows content to be wrapped when the container is reflowed. Takes two values:

  • clip - just clips the text;
  • ellipsis - add blotches of trioma.
#wrapper p( color: #FFF; padding: 10px; font: bold 16px Helvetica, sans-serif; text-overflow: ellipsis;/*Three dots are added*/ white-space: nowrap; /* Row wrapping is hindered */ overflow : hidden;/*Anything that goes outside of the container is welcome*/ )

In order for the power to work, the element also needs to be recognized as a fence between the transferred row and overflow with the hidden values.

They signify how to transfer the old words:

  1. only there, where is the rice, struck or Enter (incl., indeterminate gap and indeterminate hyphen -). Between parts of one word, a hyphen is written (for example, red-zhovty), between words a dash. "Soft hyphen" - appears only for the need to transfer. If the word goes beyond the boundaries of the father, then or to transfer yogo part without rice. Mathematical verses have a minus sign (for example, 5-2). Telephone numbers are displayed with a digital rice (for example, +7 800 000‒00‒00). And all the same I don’t know what is on the keyboard.
  2. after a symbol.
  3. zgidno with the rules of Russian language with automatic hyphenation.

overflow-wrap
word wrap
word-break
line-break
hyphens

already looking back at our 1919-kilogram korchuvach-bulldozer-navantazhuvach

lang="en"lang="en"> already looking back at our thousand dev'yatsot dev'yanosto dev'yat - kilo korchuvach-bulldozer-navantazhuvach

Why do you have only one authority in other countries

For promotional words, do not carry over, as there are no obvious statements for those additional hyphens, and start from a new row.

So that the little pictures were ignored, the eyes were immediately visible, the word-break was introduced: keep-all; .

In order for the browser not to derogate from soft hyphens, insert hyphens: none; .

If you need word wrapping, then word-wrap: break-word; raja zastosovuvati zavzhdi, oskіlki vin rozumієtsya usіma browsers. Vіn vіdіznyaєtsya vіd word-break: break-all; , if it is a priority, then, as words, if they are not placed in a block, start from a new row and the recommendation of a soft hyphen is protected.

At sleepy vikoristanni word-break: break-all; h hyphens: auto; remain ignored. hyphens: auto; rozstavlyaє be-yakі defіsi on vlasny rozsud. But in order for it to work, you need to designate your language by entering the div attribute lang="ru" .

Do not transfer words to the next row

Let's say that the menu item or the button looks badly, as if it rose to pieces. That is why it is necessary to fence them. Why should all the vishchezgadanny of power be put into the mode "for lock-in" and add. Press and marvel at our range.

Cheruvati to transferred words with hyphens: auto;

Tetragidropiranilcyclopentiltetragidropiridopiridine

Tetragidropipyridino shea

The power of white-space is restored, as if they tried between words. In savvy minds, if there are a lot of gaps in HTML code, it appears on the web as one. Vinyatkom є element

, in the spaces of the container, the text will be displayed with the usual spaces, as in the formatting of the text box.  In this rank, white-space imitates a robot 
Ale, at a glance, do not change the font to monospace.

short info

Appointment

DescriptionButt
<тип> Specify the type of the value.<размер>
A&&BThe value may be displayed in the specified order.<размер> && <цвет>
A | BPlease indicate that you need to choose only one value from the proponations (A or B).normal | small-caps
A || BSkin meanings can be conquered independently or together with others in a sufficient order.width || count
Group of values.[crop || cross]
* Repeat zero or more times.[,<время>]*
+ Repeat one or more times.<число>+
? Assignment type, the word chi group is not obov'yazkovim.inset?
(A, B)Repeat no less than A, but no more than B times.<радиус>{1,4}
# Repeat one or more times through whom.<время>#
×

Value

normal The text in the window of the browser will be displayed as it should be, transferring the rows will be automatically installed. nowrap Gaps are not protected, row transfers in HTML code are ignored, all text is rendered in one row; together with tim, addition
move text to new row. pre The text is shown with the correction of all spaces and transfers, as if the stench was added by the retailer in the HTML code. If you go out in a row too early and do not sit at the window of the browser, then you will be given a horizontal scrolling smog. pre-line The text does not break, the text is automatically transferred to the next row, as if the line does not fit in the specified area. pre-wrap All gaps and transfers are saved from the text, so that the width row does not fit in the specified area, the text will automatically wrap to the next row.

The meaning of the text is presented in Table. one.

Butt

white space

Butt

Fermat's Great Theorem
X n+Y n=Z n
de n - whole number > 2

Result this butt shown in fig. one.

Rice. 1. Static white-space

Object Model

Object.style.whiteSpace

Note

Browser Internet Explorer up to version 7.0 inclusive does not support pre-line and pre-wrap values. For