Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

kris29

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

It seems that when text is defined using style sheets, the text size stays consistent regardless of what size the viewer's browser is set to.

Is this true? And also, will any font, defined using style sheets, appear for the viewer or does it depend on what fonts are installed on the viewer's computer???

Please give me any help on this that you can. thank you.
 
1.
If use use pixels do define text size:
p { font-size: 12px }
it will stay constant.

But it will change according user choice if you use points, percents or so-called absolute-size/relative-size values:
p { font-size: medium }
p { font-size: 12pt }
p { font-size: 85% }
This is highly preferred method as it's up to user to decide how big the text should be (think about people with disabilities).
Sometimes it can cause problems with page layout changes caused by very small/big text, but it's up to developer to foresee this.

2.
There sre several standard font families available through css:
serif, sans-serif, cursive, fantasy and monospace,
each one presented by some standard fonts (like Times for serif or Arial for sans-serif).
If you specify some font that is missing on user's system the browser will substitute it with a standard one.
There are some techniques available for font embedding, but I never used any and don't recommend you too. It's implementation is not the same in different browsers (if exist) and is far from being perfect.
The set of standard ones is good enough to cover all your needs.

good luck
 
hi starway.

all this is true for IE. but it in Netscape, nothing holds true. Even when defining size using pixels, the font size changes depending on browser settings. some of my other style definitions also fail to work in netscape, like
A:hover{color:#ffffff;}which creates a rollover effect.
 
You are mixing several completely different things.

About style with size in pixels in Netscape - don't know, never tried that (and I wrote you why).

Pseudo-classes for <A> are not supported by NN4.x - that's true, it was made in 1998 and it's CSS support is rather poor.
But do you know that it works in Netscape 6.x (based on Mozilla)? There's nothing in common between them except the name, it's two completely different browsers. N6's support of CSS is much stronger and is one of the best at the moment (along with Opera).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top