views:

838

answers:

8

Elements with css font-size <12px doesn't have effect in Google Chrome - remains font-size 12px.

What should I do?

My Google Chrome browser uses default settings. My version is 4.0.249.89. I am using Windows XP.

You can paste the following code to your Google Chrome to test it:

<html>
<body>
<p style="font-size:6px;">test 6px</p>
<p style="font-size:7px;">test 7px</p>
<p style="font-size:8px;">test 8px</p>
<p style="font-size:9px;">test 9px</p>
<p style="font-size:10px;">test 10px</p>
<p style="font-size:11px;">test 11px</p>
<p style="font-size:12px;">test 12px</p>
<p style="font-size:13px;">test 13px</p>
<p style="font-size:14px;">test 14px</p>
<p style="font-size:15px;">test 15px</p>
<p style="font-size:16px;">test 16px</p>
</body>
</html>

Results from different browser: http://i178.photobucket.com/albums/w258/neodeep2001/chrome-font-size-diff.jpg

+1  A: 

this should not be correct, you probably have an element overwriting your current given attribute.

like this:

body {
  font-size:10px;
}

#content {
  font-size:12px;
}
Paul
I have just added a piece of sample code.
Billy
A: 

It works for me.

Try to:

  • use webdesigner tools, to check what css affects your element
  • post html and css aswell, so we can maybe figure out more

Edit: Latest Chrome (stable) renders this this way: Rendering in chrome

Adam Kiss
I have added the screencap of 4 browsers.
Billy
take screenshot of css that affects it - right click on one of `test text: 6 - 11px` and pick "check element" or something like it (i have localized chrome) - it should be the last one (if you know what i'm talking about, stop reading further) - then document inspector opens up and on the right side is panel `styles` - screenshot it and post it pls, maybe we'll see.
Adam Kiss
A: 

what happens if you make the < P > tag a < SPAN > tag?

is it possible you have defined your < p > tag somewhere along?

Paul
The sample code is enough for testing. Just paste the code to your Chrome to have a look.
Billy
A: 

It works for me in Chrome 4.0.249.78 (36714) , could you be viewing a cached copy?....Try emptying your page cache (I've found chrome very fond of its cache)

James B
It's not the cache problem. I am using Windows XP. Does the problem only happen in certain OS?
Billy
I'm able to view the html code you posted fine and I'm using Chrome on Windows XP Pro (admittedly a slightly older build and the beta version with extensions support), the cache is the only thing I can think of if you are using the same basic html as you pasted in your OP. What happens when you use the "inspect element" menu option, does it show up as having your smaller font sizes?...or does it look like it's being overridden in some way?
James B
What about viewing your html file in an incognito window?...Sorry but I'm still stuck on it being a cached copy of the file (it took me ages to change my Stack Overflow avatar and get it to show up in chrome due to its overzealous caching)...although it would show up correctly in an incognito window (as it was bypassing the cache)
James B
A: 

Is there a minimum font size preference? Is it set to 12px? Is page/text zoom enabled? Do you have any kind of Chrome plugins that alter page contents?

eyelidlessness
I was looking for a minimum font, too, but I couldn't find it. Doesn't mean the pref isn't hidden somewhere, though.
Anonymous
I am using default setting and do not have any plugins.
Billy
A: 

Have you tried putting an "!important" clause behind the font styles? This would override everything else. At least then you would know where to look for the problem. Like this:

<p style="font-size:6px !important;">test 6px</p>
Erik
That shouldn't be necessary when he's using a style attribute instead of a style rule.
LeguRi
+2  A: 

According to http://www.google.com/support/forum/p/Chrome/thread?tid=389f306a52817110&amp;hl=en Chrome supports a minimum font size. If you open "Documents and Settings\User_Name\Local Settings\Application Data\Google\Chrome\User Data\Default\Preferences" in a text editor, do you see something like the following?:

   "webkit": {
      "webprefs": {
         "default_fixed_font_size": 11,
         "default_font_size": 12,
         "fixed_font_family": "Bitstream Vera Sans Mono",
         "minimum_font_size": 12,
         "minimum_logical_font_size": 12,
         "sansserif_font_family": "Times New Roman",
         "serif_font_family": "Arial",
         "standard_font_is_serif": false,
         "text_areas_are_resizable": true
      }
   }

Closing Chrome, changing the minimum font size, and restarting Chrome may help.

Arne Roomann-Kurrik
A: 

have the same issue with my site

http://bhaa.ie/members/app/houses

each of the sector, company and team names should appear as a tag cloud. anybody spot an issue with my css?

emeraldjava