/    Sign up×
Community /Pin to ProfileBookmark

body font-size probs with ie7 and ff

Hello all,

I had a problem with font sizing in firefox and IE7. FF recognised the body size of 70% and sized my <h3> accordingly. IE7 did not, so i had sizing differences. I read a post about changing the body font-size to .9em and it seems to work. Is this the correct way of solving the size issue? Anyone else use this?
Thanks
Steve

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelMay 06.2008 — Usually, re-style font-size on BODY first & pre-emptively, then, re-stating font-size for the elements that will actually be 'text' makes them more all-browser. Something like:

....

body {font-size:65%;....}

p {font-size:1.0em;....}

h1 {font-size: 3.25em;...}

h2 {font-size:3.0em;....} (etc.)

....

I'm sure that there's more to this, -but for the most part, "font-size:[B]65%[/B]" gets IE to display fonts alot better (x-browser-wise) than it's normal-default font-size, whatever that is.

Then, you re-state the actual elements' (p, h1-6 -inclusive) font-size to the size/s that you intend.

Something about this makes for example, "10px" and "1em", be more-or-less 'the same size', convenient base-ten way of counting in case you need to have text be 'the same size' AND 're-sizeable' (in this case, by using the "em" size). So then, "1.5em" would be "15px" and so forth...

Else, "1em" might be something like 11px, 12.5px or 14.5px (I'm just guessing here) which isn't much of a deviation until you get into the H-tags... then you REALLY start to see IE/Fx variations in font-sizes as an h1 tag might be 3.25em but show up as one of either 33px or 44px when viewed cross-browser... (numbers are totally arbitrary & probably not even close to actual real-world)..
Copy linkTweet thisAlerts:
@tiki16authorMay 06.2008 — Okay, so the body{font-size:.9em;} is garbage.

I had never seen it done this way before.

thanks
×

Success!

Help @tiki16 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...