Forum Moderators: not2easy

Message Too Old, No Replies

Global font size for a site.

Is this possible?

         

fischermx

9:13 pm on Apr 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I'm doing a very, very simple website to which I want that everything, or almost every text that appears on it has the same fontsize. The text can be in lables, textboxes, textareas, and this could be floating alone or inside TDs on a table.

It seems that I just can't achieve this since some of these elements can be nested inside each other and the fontsize get decreased for each nest.

Example, one attemp was this :
p, td, th, ul, ol
{
background-color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size : 0.75em;
}

However, it does not cover the textboxes. Now if I add "textarea" and "input" on the list, the fonts in there get the proper family, but the font-size looks smaller than the rest.

So, the questions are : could this be achieved? if so, how?

Thanks in advance.

killroy

10:07 pm on Apr 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



well, em is a relative font size. What you COULd try is this:

* {
background-color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size : 0.75em;
}

Not tested this though.

SN

Longhaired Genius

10:25 pm on Apr 3, 2005 (gmt 0)

10+ Year Member



This can be done easily, don't worry.

Set the text-size of the body to 75% (or whatever, it should be a percentage size). Set the text-size of everything else to 1em. Set the text-size of textarea and input to 1.2em or whatever looks right.

That should do the trick. I'm going to bed now, I'll check back tomorrow, let us know if it works.

fischermx

1:12 am on Apr 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The "*" cause the same exact effect as listing each different element type. Thanks for the try.

I'll check the other.

choster

3:53 pm on Apr 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To reduce font sizes globally and simultaneously get around an IE bug that causes microfonts in some combinations of text sizes, we go with

html {font-size:70%}
body {font-size:100%}