title: python-docx Change header left margin only
body: <p>I am using <code>python-docx</code> library to add an image to header and footer of a <code>.docx</code> file.</p>
  
  <p>By default, there is a left margin to both Header-Footer as well as the Page.</p>
  
  <p>In order to change the left margin of Header-Footer to 0 if I use <code>section.left_margin = 0</code> this sets the margin of whole page to 0. But I only want to change the left margin of Header-Footer to 0.</p>
  
  <p>So: How can I change the left margin of only the Header and Footer using <code>python-docx</code> or any other library.</p>
  
  <p>Current Document Image - if I simply add Image to header and footer that has same width as <code>section</code>'s width:</p>
  
  <p><a href="https://i.stack.imgur.com/cp7Oy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cp7Oy.png" alt="enter image description here"></a></p>
  
  <p>Document Image if I also do <code>section.left_margin = 0</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/ygL7X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ygL7X.png" alt="enter image description here"></a></p>
  
  <p>What I actually want:</p>
  
  <p><a href="https://i.stack.imgur.com/DNMe9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DNMe9.png" alt="enter image description here"></a></p>