davatron5000 / FitText.js

A jQuery plugin for inflating web type
http://fittextjs.com
6.76k stars 1.39k forks source link

Margin-Top Suggestion #71

Closed Kelderic closed 10 years ago

Kelderic commented 11 years ago

Is there a way that an option to change margn-top could be added? I have a large title, floating vertically in the middle of the page, with margin top holding it down. as the text gets smaller, margin-top should increase to keep it steady.

I thought about instead using: position:absolute, top:50%, margin-top:-half ... but since the text itself is resizing, the height isn't fixed. Any ideas?

davatron5000 commented 11 years ago

Have you tried setting your margins in ems?

.mything { margin-top: -0.5em; } 

that would be "minus-half" kinda by definition.