1.0.3 • Published 7 years ago

mjml-section-bg-img v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

mjml-section-bg-img

Sections are intended to be used as rows within your email. They will be used to structure the layout.

<mjml>
  <mj-body>
    <mj-container>
      <mj-section full-width="full-width" background-color="red">
        <!-- Your columns go here -->
      </mj-section>
    </mj-container>   
  </mj-body>
</mjml>

The full-width property will be used to manage the background width. By default, it will be 600px. With the full-width property on, it will be changed to 100%.

UPDATED: Windows 10 background image support.

<mjml>
  <mj-body>
    <mj-container>
      <mj-section-bg-img background-image="image.jpg" background-color="#333333" background-width="600" background-height="600">
        <!-- Your columns go here -->
      </mj-section>
    </mj-container>   
  </mj-body>
</mjml>
attributeunitdescriptiondefault value
full-widthstringmake the section full-widthn/a
borderstringcss border formatnone
border-bottomstringcss border formatn/a
border-leftstringcss border formatn/a
border-rightstringcss border formatn/a
border-topstringcss border formatn/a
border-radiuspxborder radiusn/a
background-colorcolorsection colorn/a
background-urlurlbackground urln/a
background-repeatstringcss background repeatrepeat
background-sizepercent/pxcss background sizeauto
background-widthpxOutlook background sizen/a
background-heightpxOutlook background sizen/a
vertical-alignstringcss vertical-aligntop
text-alignstringcss text-aligncenter
paddingpxsupports up to 4 parameters20px 0
padding-toppxsection top offsetn/a
padding-bottompxsection bottom offsetn/a
padding-leftpxsection left offsetn/a
padding-rightpxsection right offsetn/a
directionstringltr / rtlltr
css-classstringclass name, added to the root HTML element createdn/a