How to change font size using CSS in Firefox

>> Tuesday, June 12, 2012

How to change font size using CSS in Firefox
hi friends,

In my website, I cannot change font settings using CSS when I open it in Mozilla Firefox. However, it allows me to perform all necessary font settings in Internet Explorer using CSS, it works quite nicely with IE. But in Firefox, it ignores the font size settings. How can I change font size using CSS in Firefox ?
Can anybody please provide necessary ideas or suggestions regarding this.... thanks

#2
30-06-2009

johnson22
Member

Join Date: May 2008
Posts: 2,112
Re: How to change font size using CSS in Firefox
Cascading Style Sheets (CSS) gives different results in different browsers even in different versions. Fonts appear smaller in Firefox than Internet Explorer. The ideal solution is to use Internet Explorer readable conditional comments which can be read only by IE, so make separate stylesheets for different browsers and then connect them accordingly.

Best of Luck

#3
30-06-2009

Techno01
Member

Join Date: Apr 2008
Posts: 2,268
Re: How to change font size using CSS in Firefox
Initially set an overall font-size for your site by defining a base font-size in the body tag of your css file. Then atleast the base size will be the same.

Browser sometimes behave weird. Because of browser weirdness, when you specify 100%, it is sometimes interpreted differently by different browsers, so in your style sheet use:
body {font-size:100.01%;}

Then you can define your font sizes for your page.
If you want to define all your

tags as a fixed size: p {font-size:11px;}
So for roughly 11pt font I'll define the

tag: p {font-size:0.76em;}

The important thing here is to define the base size in the css body, that way you get rid of some unpredictable cross-browser base sizes.

0 comments:

Post a Comment

Read - Share - Comment

About This Blog

Share and Save

About Author