1

When I apply position:fixed to an element, the font renders much thinner and pixelated. If the position is relative or absolute, the font renders cleanly.

I've noticed the issue in both Firefox and Safari. What's happening?

Edit

Here is an image showing the difference in text. The only thing being changed is the position. The effect is similar in Safari, but less dramatic.

The CSS font-smoothing and anti-alias suggestions don't seem to make a difference.

font render example

HWD
  • 1,547
  • 7
  • 36
  • 72

2 Answers2

1

This might be a rendering issue. Try this on the element for better rendering:

-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
Ben
  • 11
  • 2
0

Try to use z-index: 1 and position relative on the parent element. See solution in this video:

https://www.youtube.com/watch?v=9Woaz-cKPCE&hd=1

I can imagine it has something to do with each other.

Remo L.
  • 720
  • 6
  • 19