I am using this code to dynamically resize text:
function fontResize(){
$('.features').css('font-size', ($(window).width()/100) + 'px');
}
fontResize();
$(window).resize( function () {fontResize()});
This works great for pulling the browser inwards but when i’m stretching the screen out on my 21″ iMac, the text is too big for a set size DIV i have. how can i implement a solution whereby i can cap the maximum font size on the text. Will i be able to override this function above and put a max-font-size of 13px?
Thanks
1 Answer