Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font weight of text changes in a fixed div when it scrolls over flash or jquery google maps, why and what to do about it?

A while ago I made a fixed div as a navigation menu for a page. I noticed that the text's font-weight decreased when it scrolled over a vimeo flash movie.

Now I am seeing it again in another navigation menu, but this time while scrolling over a jquery google map: http://jorenfrielink.com/beta/

As you can see the menu button's font-weight decreases when it overlays the map. So far I've noticed this in chrome and safari.

Is this a common problem and what is there to do about it?

like image 660
joren Avatar asked Oct 13 '12 21:10

joren


People also ask

Which tag should we use to change the font weight of a text?

You can use the <b> tag, the <strong> tag, or you can do it in CSS with the font-weight property.

How do font weights work?

Font weight is the “value” placed on your font that will determine how bold or light your text will appear. There are many “values” that you can use that provide a great deal of flexibility towards creating the font weight that works best for how you want to display your text.

What does font weight mean in CSS?

The font-weight property sets how thick or thin characters in text should be displayed.

How do you change the weight of text in HTML?

You can use font-weight to change the lightness or boldness of text, then give it a value such as normal , lighter , bold , or bolder . You can also use values like 100, 200, 500, and so on. Just like font size, you can change the font-weight in inline, embedded, or external CSS.


2 Answers

Something is causing your font smoothing to change, things like css3 animations or transforms can cause that. Try adding this to your navigation text:

-webkit-font-smoothing: subpixel-antialiased;
like image 131
Eric Valadas Avatar answered Sep 30 '22 16:09

Eric Valadas


As Joren mentioned: -webkit-font-smoothing: antialiased;

This worked in Chrome + Safari

like image 32
MichaelBell Avatar answered Sep 30 '22 17:09

MichaelBell