I want to create a responsive text inside a div.
I tried jquery-textfill and FlowType, but they are not working for me at all.
FlowType does
CSS
.internal{width:100%;height:100%}
.external{width:auto;height:auto;background-color:yellow}
JQuery
$(".external").fitText(0.5);
DEMO 1
Update 1:
CSS
.internal{width:auto;height:auto;position:absolute;}
.external{width:400px;height:50px;background-color:yellow;position:relative;}
JQuery
$(".external").fitText();
DEMO 2
Update 2:
JQuery
var ex=$(".external");
var h=ex.height();
var w=ex.width();
ex.fitText(Math.min(h,w)/Math.max(h,w) );
DEMO 3
Update 4:
Bigtext is a jQuery text plugin that automatically enlarge the font size of your text to fill its parent container, without overflowing the container Div.
jQuery Bigtext Plugin