|
Perenapravlenie on other address
Often there are problems{tasks} when to the certain catalogue or page it is necessary to redirect all searches (redirect) on other address. It can be made with the help of Redirect directives and RedirectMatch. They inform, that the resource on requested url is absent, and specify the address on which it is necessary to proceed{pass}. Redirect directives send a browser corresponding heading, and already a browser carries out perenapravlenie.
Use of the background image for replacement of the text
With the help of simple trick CSS you can improve performance of fonts on the webs - pages. Thus both not graphic browsers and search robots can normally work with them.
For understanding of this lesson base knowledge of tables of styles quite will suffice the reader. Besides it is supposed, that the offered{suggested} method will be applied accurately and responsibly{crucially} in logically correctly marked documents.
Introduction
You dream to receive a letter quality of headings and decorative fonts with the help of images instead of "naked" HTML? At all those rich opportunities of formatting of the text, available in CSS, it is sometimes difficult to be kept from desire to open Adobe Photoshop and to type{collect} there the text a liked font, having set thus the necessary size, kerning and tracking. You in fact know, that if to insert such image into web - page any user of the Network which browser is capable to show the schedule, will see your font masterpiece how you and conceived. Correctly?
But us for it so often beat on hands, sentencing, that for use of images instead of usual fonts on webs - pages we shall get directly in a hell. So gradually, we reduced the visual requirements and have given up the thought that on webs - pages sometime the beautiful font again will appear. Have left until many years later function of loading of the fonts, stipulated in CSS, does not become reliable and will not receive due distribution.
Us learned{taught}, that images are not always accessible to all browsers as against a plain text. It is especially fair for specific browsers and portable devices with small screens. So casting the text as images, we should test remorses. In fact text browsers (such as Lynx) or browsers with the switched - off show of images will not show ours of a picture. Even if we are so responsible{crucial} in job that we do not overlook to register for each element schedules attribute alt, search robots often index the metadata (similarly to contents of attributes alt and title) not how "pure{clean}" HTML. It becomes understandable, if we shall consider logic importance of heading of the text placed between tegami <hn> </hn>. What to speak about problems with the sizes of files and time of loading of the pages overloaded grafikoj.
Let's postpone for a while all this information in storonku. Whether so plokhi images actually? With the help of small tricks CSS, hardly more cautious planning and testing, it is possible to receive beautiful fonts on webs - pages, and thus the page remain accessible to all (see a note below), even for conducting the indexation robots. Time again to spread wings!
The basic idea
The basic idea is very simple: we shall write a small line of the text (for example " Hello world! ") also we shall place her{it} inside of two sets HTML-tegov. Then with help CSS we shall hide this text, and instead of him{it} we shall show the background image which will contain the same words. That's all. To replace the text with the image not so it is difficult, as it seems.
Before to undertake for CSS, let's create a simple code of a HTML-marking. Present, that we have something like it:
<div>
<span> Hello world! </span>
</div>
By itself, we could issue simply the text with the help of styles. But we need something more skilful, than children's game with values for properties font-family or text-transform. We in fact want pyshnosti! Time we speak " Greetings! " To the world it is necessary to do{make} it hhjogol`ski, correctly?
Let's choose for our greeting to the world the most suitable font, say, Shelley Allegro. We count, that well-known in the environment of designers Shelley Allegro is so brilliant, that will easily subdue hearts of millions when we with his{its} help shall say " Hello! ". Under our data this font is accessible only on 1,65 % of computers all over the world. Therefore, we shall spend slightly time and we shall create the image about all the same text " Hello world! ". Any user of any browser in whom show of images is not switched - off, will see our greeting typed by font Shelley Allegro even on those computers where he is not established.
Let's remember, that the height of the image makes 35 pikselov as this information is required to us further.
So, we have slice HTML of a code, the magnificent message to the world as the text and it as the contemptible image. What we with them shall make? Let's roll up sleeves and we use the small table of styles for replacement of the text with the image.

|