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
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:
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.
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.
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:
- 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. - after a symbol.
- 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
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
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 robotAle, at a glance, do not change the font to monospace.short info
Appointment
Description | Butt | |
---|---|---|
<тип> | Specify the type of the value. | <размер> |
A&&B | The value may be displayed in the specified order. | <размер> && <цвет> |
A | B | Please indicate that you need to choose only one value from the proponations (A or B). | normal | small-caps |
A || B | Skin 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
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
Opera prior to version 9.5 does not support the preline value. For
For Firefox
Specification
Skin specificity to go through the stages of hibernation.
- Recommendation (Recommendation) - the specification has been praised by the W3C and is recommended as a standard.
- Candidate Recommendation ( Possible recommendation) - a group that conforms to the standard, is satisfied, as if it were supporting its goals, but it needs additional help from the retailers to implement the standard.
- Proposed Recommendation ( Promoted recommendation) - at which stage the document is submitted to the W3C Advisory for residual solidification.
- Working Draft (Working Draft) - a larger mature version of the blueprint after discussing that amendments for a better look.
- Editor's draft ( editorial blackie) is a draft version of the standard after the editors have made changes to the project.
- draft ( Chernivets specifications) is the first black version of the standard.
The power of the word-wrap is shown to wrap no other words, as they are placed in width in a given area.
short info
Appointment
Description | Butt | |
---|---|---|
<тип> | Specify the type of the value. | <размер> |
A&&B | The value may be displayed in the specified order. | <размер> && <цвет> |
A | B | Please indicate that you need to choose only one value from the proponations (A or B). | normal | small-caps |
A || B | Skin 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 Rows are not transferred, but are transferred in quiet places, de explicitly set to transfer (for example, for help
). break-word Row wrapping is added automatically so that the word fits into the given block width.
Butt
Name
excellency
Spiritual name
eleventh grade student
Chemical speech
methoxychlorodiethylaminomethylbutylaminoacridine
The result of this butt of testimony in fig. one.
Rice. 1. Transferring old letters
Object Model
Object.style.wordWrap
Specification
Skin specificity to go through the stages of hibernation.
- Recommendation (Recommendation) - the specification has been praised by the W3C and is recommended as a standard.
- Candidate Recommendation ( Possible recommendation) - a group that conforms to the standard, is satisfied, as if it were supporting its goals, but it needs additional help from the retailers to implement the standard.
- Proposed Recommendation ( Promoted recommendation) - at which stage the document is submitted to the W3C Advisory for residual solidification.
- Working Draft (Working Draft) - a larger mature version of the blueprint after discussing that amendments for a better look.
- Editor's draft ( editorial blackie) is a draft version of the standard after the editors have made changes to the project.
- draft ( Chernivets specifications) is the first black version of the standard.
Hello everyone). I continue to write about differences crooks of authority move css, so you can help with layout. And today I want to know how to work with css to transfer words, so that the stench does not fit into your container. I will show you everything on a real application.
Including portability for words, yaki do not fit
For example, I have a block with a width of 100 pixels and I need to write some text in a new one. The text has the word " self-packing". So buvaє archives, for example) Ale is not the point. The word is more than long, it's just not close to the container for the width. Let's write yoga in such a thin block (100 pixels). What will you do?
Yak Bachimo, the word forgot for the borders of the container, well, there’s no way you can go, you’re afraid. І ce without steps. So the axis, here the word-wrap comes to the rescue. The axis of which is necessary to set the block, in order to increase the transfer of words for letters in the new one:
Word-wrap: break-word;
For perekonlivost it is possible to prescribe the internal inputs (padding). Otzhe, after the stagnation of the power of Bachimo, that for a long time the words are transferred by letters to the next row. Moreover, if you do not wind up another row for a word, you decide to move one part to the third, and so on.
I want to signify that you can win victorious without fear. First of all, today it miraculously works in browsers. In a different way, it will work according to the reasonable. And for itself, for all normal words, there will be no transfers, the words will be transferred as a whole to the next row, so the readability will not collapse. You can help me on this screen.
In some cases, vikoristovuvaty word-wrap
Vlasne, while I’m still bacheling 2 variants of vikoristannya. The first one is for the narrowest blocs, de vie be afraid that the other words can ugly run out of the middle of the bloc. Another thing, if the designer thought of it this way, was to call the site bula in a row of sprats.
Later, in these articles, we recognized how to transfer words from css. In May this year, everything. To zustrіchi.