I am using DOMPDF to make an invoice. I need to have a few div's side by side. The float element is not working. I am trying to get Column 2 beside Column 1
<?php
require_once "dompdf/dompdf_config.inc.php";
$dompdf = new DOMPDF();
$html ='
<html>
<link type="text/css" href="pdf.css" rel="stylesheet"/>
<body>
<div class="columns">
<div class="red" >Column 1</div>
<div class="grey">Column 2</div>
<div class="red" >Column 3</div>
</div>
<div class="clear"></div>
</body>
</html>
';
$dompdf->load_html($html);
$dompdf->render();
//$dompdf->stream("hello.pdf");
$dompdf->stream('my.pdf',array('Attachment'=>0));
?>
Below is the CSS
div.columns { width: 50%; }
div.columns div { width: 50%; height: 100px; float: left; }
div.grey { background-color: #cccccc; }
div.red { background-color: #e14e32; }
div.clear { clear: both; }