Forums / Templates, Stylesheets, Page Layout / Global Font Size Setting: Changing Percentage and related EM Font Sizes

Global Font Size Setting: Changing Percentage and related EM Font Sizes

Locked

Started by donn on 15 Feb 2009, 8:01 PM · Views: 2,748

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Feb 2009, 8:01 PM
#1
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

Global Font Size Setting: Changing Percentage and related EM Font Sizes

Good day to all of the Zen Cart ppl! :smile:

Recently, I did a not-so-good thing and began setting type sizes throughout my new ZC 1.3.8A install...backwards.

:shocking::shocking:

I set the EMs first, but failed to set the global type size percentage. So, there were some i instances of tty bitty text that were not readily changeable.

I was going to just find every instance of unselected type and individually ID them and thus set a larger type size via the style sheet, but then I realized this is a lame workaround. :dontgetit

So now, I'm going to do this the right way. :yes:

I found, from another poster on this forum, that on line 16 of the style sheet,

font-size: XX%

ALL non ID'ed, class'ed, or otherwise selected type can be set, size-wise.

So now....

I went from 65% to 75%

That's an increase of 1.154% (75.01%)

OK, slightly off....

Now, I would like to resize all of the type I set in the stylesheet using em at the original 65%, to a new value that will keep them the same size, at the new 75% global font size setting.

I realize that I cannot simply multiply all type set with EM values by 1.154%, because the new fixed point the type is 'compared with' is already 1.154% larger.

Would I simply take 1.154% off the current em value?

example....
at 65%

h1 {
	font-size: 1.8em;
	color: #000000;
	}

Would this simply be:

1.8 / 1.154 = 1.5598 em

???

Thanks,
Donn

15 Feb 2009, 8:11 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Global Font Size Setting: Changing Percentage and related EM Font Sizes

I don't think that font sizing to such a fine tolerance (to 4 dec. places) is possible (I may be wrong).

16 Feb 2009, 8:20 PM
#3
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Global Font Size Setting: Changing Percentage and related EM Font Sizes

Depending on the browser, some decimal point sizes will simply render at the nearest size the browser understands. So no, there's no need to set anything quite that precisely, and not much value to be gained from doing so.

Were your original changes to the em quantities made in an essentially stock stylesheet? Then I would simply go back to that stylesheet and scrolling down it and your current one side-by-side in an editor, change each em back to what it is in the original stylesheet. I don't think there are that many to deal with that this would be onerous.

Acckk!! I take that back; there are over a hundred of them!!! :lamo:

Rob

Breakfast: the most important donut of the day.