html5 - What is breaking my page when printing? -


i have questioner , don't know why when printing it's creating break before first question.

live demo (link)

enter image description here

i able resolve issue removing fieldset container had wrapped in.. having fieldset element causing of fields grouped together, , since not fit on first page, being pushed second page. removing fieldset element, able firefox print first 2 questions on page 1 identically chrome.

it seems not new problem firefox , fieldset not playing nice found old bugzilla ticket 2008 has persisted , still being commented on in 2014 (link)

if retaining fieldset important, found solution else came here (link)

<script type='text/javascript'>     $(window).bind('beforeprint', function(){         $('fieldset').each(             function(item)             {                 $(this).replacewith($('<div class="fieldset">' + this.innerhtml + '</div>'));             }         )     });     $(window).bind('afterprint', function(){         $('.fieldset').each(             function(item)             {                 $(this).replacewith($('<fieldset>' + this.innerhtml + '</fieldset>'));             }         )     }); </script> 

Comments

Popular posts from this blog

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -