Skip to content

Instantly share code, notes, and snippets.

@jakejackson1 jakejackson1/example-float.php Secret
Last active Feb 23, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.