0

I have a header in pdf report where height of the header will keep on varies when header is edited and my header.html.erb looks like this -

<div id="custom_header">
  <div style="margin-top: 30px;"></div>
  <%= HeaderFooterDesign.custom_header %>
</div>

<style>
  #custom_header {
    position: fixed;
    top: 0px;
    left: 0;
    bottom:0;
    width: 100%;
    height:200px;
  }

  body {
    top: 0px;
    height:200px;
    width: auto;
  }

now i have given height: 200px; in css ,header will display properly to some given height if the height is more or the height exceed the limit given then header wont display in the pdf report so i am looking for dynamic height with position fixed factors i Dont want Scroll header so can any one help me out

Hemanth M C
  • 436
  • 1
  • 4
  • 18

1 Answers1

0

In a normal css you can use min-height: 200px. But since the top margin assigned to the pdf is defined by the configuration of margins ... you need to take that in consideration. You can check this post, it's about changing the footer margin space, but it migth help you to find an answer wicked_pdf: footer height/styling

Community
  • 1
  • 1
m0000g
  • 913
  • 6
  • 6