Home
Home Page
Than differ id and class
Creation WAP of a page
Passions around AJAX are heated
Answers to often asked questions on XHTML and HTML
The sanction of the screen and marking of pages
Two styles ajax'?
Business Macromedia lives
XHTML+CSS. Advantages are obvious
Microformats
The semantic network based on microformats
Fonts and CSS
CSS from And up to I
Properties of the text
Illumination of the link
Change of a background in the table
Fixation of fonts on page with the help of the table of styles
Krossbrauzernoe alignment on the center
Polling with help AJAX
HTML
Links
 

Fixation of fonts on page with the help of the table of styles

Let's assume, that you have created nice enough page with small quantity{amount} of graphic elements, the text at you is located in the table in two columns. You some time admire your creation, but here there comes your friend and immerses you in deep despondency, having put in adjustments of a browser larger font. You see, that the page has become rather far that has been conceived initially. What to do{make}? The most simple way of the decision of a similar problem{task} consists in drawing up of the table of styles for your site. These tables concern to cascade tables of styles (Cascading Style Sheets - CSS). It means, that at definition of style of any element all elements which are taking place inside him{it}, inherit this style.


The elementary example of the table of styles:



<style>

body

.text1 {text-decoration: none; font-family: arial, font-size: 10pt; font-weight: bold; color: red}

.text2 {font-family: sans-serif; font-size: 14pt; color: black;}

</style>


The reference{manipulation} to elements of the table:



<div class=text1> Style text1 </div> - in this case the phrase " Style text1 " will be printed by red fat font Arial in the size 10 pt.


If this phrase to make also the link she will not be underlined as text-decoration: none:



<a href = * class=text1> Style text1 </a>


Similarly


<div class=text2> Style text2 </div> - in this case the phrase " Style text2 " will be printed by black font Sans-serif in the size 14 pt.


It is possible to not make the table of styles separately, and to set style directly in tege. So, for example, to create not underlined link, it is necessary to realize her{it} in such kind:



<a href = * style = " text-decoration: none; "> Not underlined link </a>


Advantage of realization of such ways of the task of styles is that all told works both in Internet Explorer above, and in Netscape Navigator. Thus even if you will change adjustments of any of these browsers with the purpose of increase or reduction of the size of fonts you will see, that they do not change, - use of styles does not allow a browser to change the sizes of fonts. It is big achievement CSS as now you can expect, that at the majority of users the page will be displayed how you and expect it. To tell the truth, application CSS at all does not rescue from change of the sizes of system fonts Widows, but at the majority of people font Normal. If the user puts a large font he will see considerable quantity{amount} of Internet - pages in an inadequate kind.