filter input font size

filter input font size

AlekXLAlekXL Posts: 9Questions: 0Answers: 0
edited July 2012 in General
how do I change? It must be recalculated depending on screen size, in OnLoad event.
[code]
var wh=$(window).height();
var fs=Math.round(wh/35);
if (fs<11) fs=11;
bigFontSz=fs;
fs=Math.round(wh/45);
if (fs<11) fs=11;
regFontSz=fs;
$("body").css("font-size", fs );
$('#example #filter').css("font-size", 30);
[/code]
Code
$('#example #filter')
I found somewhere in the forum. But it does not work for me.

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    [code]
    $('div.dataTables_filter input').css('font-size', 30);
    [/code]

    Allan
  • AlekXLAlekXL Posts: 9Questions: 0Answers: 0
    yes, it worked, thkz.
  • AlekXLAlekXL Posts: 9Questions: 0Answers: 0
    probably datatables should ensure that filter input control font size does match effective td font size.
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    That's a styling issue, rather than something that should be done with Javascript, and the default DataTables stylesheets don't alter the font-size of your own stylesheets. So not something that should go into DataTables core I think, but something that is certainly useful to think about in the stylesheets.

    Good to hear that worked for you.

    Allan
This discussion has been closed.