Skip to content

Instantly share code, notes, and snippets.

@jakejackson1
Last active February 23, 2016 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakejackson1/6308db75277e54db47d9 to your computer and use it in GitHub Desktop.
Save jakejackson1/6308db75277e54db47d9 to your computer and use it in GitHub Desktop.
A sample PDF template showing off the float support
<?php
/**
* Template Name: Example Float
* Version: 0.1
* Description: A sample PDF template showing off the float support
* Author: Gravity PDF
* Group: Example
* License: GPLv2
* Required PDF Version: 4.0
*/
/* Prevent direct access to the template (always good to include this) */
if ( ! class_exists( 'GFForms' ) ) {
return;
}
?>
<style>
.row {
clear: both;
margin-bottom: 5mm;
}
.col {
float: left;
}
.col-1-2 {
width: 49%;
padding-right: 1%;
}
.col-1-3 {
width: 33%;
padding-right: 0.3%;
}
.inner {
padding: 10px;
border: 1px solid black;
}
</style>
<div class="row">
<div class="col col-1-2">
This is my left column
</div>
<div class="col col-1-2">
This is my right column
</div>
</div>
<div class="row">
<div class="col col-1-2">
<div class="inner" height="40mm">
This is my left column
</div>
</div>
<div class="col col-1-2">
<div class="inner" height="40mm">
This is my right column
</div>
</div>
</div>
<div class="row">
<div class="col col-1-3">
<div class="inner" height="40mm">
This is my left column
</div>
</div>
<div class="col col-1-3">
<div class="inner" height="40mm">
This is my middle column
</div>
</div>
<div class="col col-1-3">
<div class="inner" height="40mm">
This is my right column
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment