Welcome to Fogfighters Hungary!
 
  Login or Register
.week  
Time
 
 
 
Languages
Select Interface Language:

 
Google Translation
Translation
 
Traffic Report
 
Where are you from?
 
Map Random
Objective
Sp_delivery2
View Sp_delivery2
The Axis are temporarily storing a number of gold crates in a fortified storehouse while they await their transfer to a more secure location. Allies must first gain control of the storehouse by damaging the forward bunker's E
Hits: 5
Total Maps: 85
 
Modules
· Home
· About Easter
· Büntetés kalkulátor
· Bible
· Biorythm
· Birds
· Black Gallery
· Cats
· Coppermine
· Dogs
· eCards
· ET Game manual
· ET Handbuch
· ET játékleírás
· ET Maps
· Fórumok
· FIFA World Cup 2006
· Fish
· Google Guide
· Googlemaps
· Hírküldés
· Help Desk
· Internet_TV
· Keresés
· Letöltések
· Members List
· Member_Map
· News
· Online Radios
· PHP-Nuke_HOWTO
· PHP-Nuke_Tools
· Private Messages
· Punkbuster
· Saját beállításaid
· Shout Box
· Statisztikák
· Szavazások
· Szerencsejáték
· Tagfelvétel
· Viccek
· Videó kollekció
· Web címek
· Web Development
 
MS-Analysis
Top-Ten Countries visiting Fogfighters Hungary

1 United States United States
2 China China
3 Viet nam Viet nam
4 Russian Federation Russian Federation
5 France France
6 Hungary Hungary
7 Canada Canada
8 Ukraine Ukraine
9 United Kingdom United Kingdom
10 Netherlands Netherlands
11 Germany Germany
12 Poland Poland
13 Italy Italy
14 Taiwan, Province of China Taiwan, Province of China
15 Seychelles Seychelles
16 Romania Romania
17 Indonesia Indonesia
18 Australia Australia
19 Thailand Thailand
20 Sweden Sweden
21 Brazil Brazil
22 India India
23 Japan Japan
24 South Africa South Africa
25 Lithuania Lithuania
26 Argentina Argentina
27 Spain Spain
28 Chile Chile
29 Luxembourg Luxembourg
30 Turkey Turkey
31 Moldova, Republic of Moldova, Republic of
32 Korea, Republic of Korea, Republic of
33 Venezuela Venezuela
34 Malaysia Malaysia
35 unknown unknown
36 Switzerland Switzerland
37 Singapore Singapore
38 Colombia Colombia
39 Hong Kong Hong Kong
40 Mexico Mexico
41 Belize Belize
42 Greece Greece
43 Mongolia Mongolia
44 Honduras Honduras
45 Estonia Estonia
46 Czech Republic Czech Republic
47 Latvia Latvia
48 Bangladesh Bangladesh
49 Bulgaria Bulgaria
50 Pakistan Pakistan

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




World Sandwich Day


 
Képes Naptár
There is a problem right now with this block.
 
CPG Random Picture

A bank fölső részén lévő ajtó a pincékhez vezet

 
Latest Videos


Last added videos

Orvosnál

Orvosnál

Last added videos

Funny

Funny Mortar

Last added videos

Shy

Shy Rose - I Cry For You
 
How to change the font size in PHP-Nuke

14.12. How to change the font size in PHP-Nuke

Since every theme comes with a CSS (style.css, see also Section 28.3 and Section 25.7) in the styles folder of the theme itself (see Section 14.1), it is very easy to apply global formatting changes to our PHP-Nuke site: we just edit the CSS file. For example, to change the font size for all documents, we don't have to chase <font> tags in the PHP code - we only need to edit the style.css of our theme.

Note </font> is deprecated in HTML 4.x
 

</font> tags are deprecated in the HTML standard, starting from version 4.0, see Font modifier elements: FONT and BASEFONT.

Typically, in style.css there will be one or more lines specifying the font size, like:

FONT            {FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 11px}
TD              {FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 11px}
BODY            {FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 11px}
P               {FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 11px}
DIV             {FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 11px}

or

.title          {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 13px; 
FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none}
.content        {BACKGROUND: none; COLOR: #000000; FONT-SIZE: 11px; 
FONT-FAMILY: Verdana, Helvetica}
.storytitle     {BACKGROUND: none; COLOR: #363636; FONT-SIZE: 14px; 
FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none}

Font size is usually specified in pixels (px), but other units are also possible (see CSS Font-Size):

  • Relative units - they specify a length relative to another length.

    • em: the 'font-size' of the relevant font.

    • ex: the 'x-height' of the relevant font.

    • px: pixels, relative to the viewing device.

    Thus, the 'em' unit is equal to the computed value of the 'font-size' property of the element on which it is used. The exception is when 'em' occurs in the value of the 'font-size' property itself, in which case it refers to the font size of the parent element. That's what the following joke refers to:

    What did one .em say to the other .em? Who's your Daddy?

  • Absolute units:

    • in: inches -- 1 inch is equal to 2.54 centimeters.

    • cm: centimeters

    • mm: millimeters

    • pt: points -- the points used by CSS2 are equal to 1/72th of an inch.

    • pc: picas -- 1 pica is equal to 12 points.

Depending on where you make the font size change, it may apply only to the title, the content or even the wholy body. Inheritance in the HTML document tree is applied by the browser to decide which properties can be passed on from the "parent" elements to the "children" or the "descendants". This is called "cascading" and is responsible for the first "C" in "CSS". You need to understand cascading to use the full potential of CSS, but for simple changes like this one, you can just experiment and get the idea (see Section 28.3 for a short discussion of CSS syntax).

However, it is better, from the "Accessibility" point of view, to let your users decide themselves what font size they like, by setting it in up in their browsers (see How to change font size). Read Using relative font sizes for the background on this. Using the advice given in that article, Chris has the following in the CSS file for DocBook that controls the appearence of the PHP-Nuke HOWTO (and actually, all other documents on his site):

P {
        font-size: 12px;
}
/*/*/A{}
BODY P {
        font-size: x-small;
        voice-family: "\"}\"";
        voice-family: inherit;
        font-size: small;
}
HTML>BODY P {
        font-size: small;
}
/* */

There's a lot going on here, and it's all important, so pay attention (taken from Using relative font sizes):

  1. First, we're defining an absolute size (12px) for every <p>. All browsers apply this style, including Netscape 4.

  2. Then we include the odd-looking comment "/*/*/". Due to bugs in Netscape 4, everything between this comment and the following one will be ignored. That's right, all the following styles will only be applied in non-Netscape-4 browsers.

  3. Immediately after the odd-looking comment, we include an empty rule "a {}". Opera 5 for Mac is buggy and ignores this rule (and only this rule). It applies everything else.

  4. We have now carved out a realm where we can define rules that are applied in all browsers except Netscape 4. Now we can start defining relative font sizes (which Netscape 4 can't handle). The first thing we do is use a "body p" selector to redefine the behaviour of the p tag. Due to the way CSS works, this will override our previous p selector. (In technical terms, "body p" is a more specific selector than "p".)

  5. We redefine the font size of all <p> tags to be x-small. This is a font size keyword which, at default settings, Internet Explorer 5 for Windows will translate into 12px. However, if the user changes their "Text Size" (under the View menu), this text will scale larger or smaller, depending on the user's setting. This is what we want. (Note: we've now defined font-size twice for IE5/Win, but that's okay, because the more specific selector always wins, and the previous selector is simply ignored.)

  6. Unfortunately, IE5/Win an off-by-1 bug with its font size keywords; every other browser in the world (IE5/Mac, Netscape 6, Mozilla, IE6/Win) will translate x-small to 10px, not 12px. Luckily for us, IE5/Win has its own parsing bug that we can exploit: it looks at that odd-looking voice-family and mistakenly thinks that this entire "body p" selector is over, so it ignores all the lines until the "}".

  7. Now we have carved out a smaller realm where we can define rules that are applied in all browsers except IE5/Win (and Netscape 4, which is still blissfully ignoring all of this). So we redefine font-size to small, which modern non-IE5/Win browsers (the only ones still listening) correctly interpret as 12px (at default settings). Again, if the user sets their "text size" to larger, this text will scale larger, which is what we want.

  8. But wait! Opera 5 has the same parsing bug that IE5/Win has, so it was also confused by the voice-family hack, but it correctly interprets font size keywords, so now our text will look too small in Opera 5. Luckily, Opera 5 supports a third type of selector, "html>body p". (Again, this is "more specific" than "body p", so it takes precedence over the previous selector.) IE5/Win does not support this type of selector, so it will just ignore it, which is what we want (since we've already compensated for it's off-by-1 bug and don't want to go mucking that up now). IE6/Win also does not support it, but that's OK, because we caught it with the "font-size: small" after the "voice-family: inherit" hack in the "body p" selector. All other browsers support "html>body" selectors, so for them we end up defining font-size four times. Again, that's not a problem, because the most specific selector always wins, and the rest are simply ignored.

  9. Finally, we have a set of empty comments: /* */. This triggers Netscape 4's parser to start listening again. If we defined any further rules after these empty comments, all browsers (including Netscape 4) would apply them.

To recap:

  1. Netscape 4 displays <p> text at 12px, regardless of user setting.

  2. Internet Explorer 5 for Windows displays <p> text at x-small, which works out to be 12px at the default setting, but would scale larger if the user set their "Text Size" setting larger in the View menu.

  3. Internet Explorer 6 for Windows displays <p> text at small, because of the "font-size: small" rule in the "body p" selector. This works out to 12px at the default setting, but would scale larger if the user set their "Text Size" setting larger.

  4. Internet Explorer 5 for Mac, Opera, Netscape 6, Mozilla, and (hopefully) all future browsers will display <p> text at small, because of the "font-size: small" rule in the "html>body p" selector. This works out to 12px at the default setting, but would scale larger if the user used the "Text Zoom" feature.

Tip Dive into Accessibility!
 

By the way, the whole Dive into Accessibility document by Mark Pilgrim is highly recommended reading for everyone. It will open your eays to a different world - that also uses the Internet!


Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

Send all questions and comments to:
Webmaster
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest Fogfighters Hungary © 2007 - 2022

You can syndicate our news using the file backend.php or ultramode.txt

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.23 Seconds

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::