I was trying to working with DOMPDF with Laravel..But the problem i was facing that none of the inline css as well as table not showing the proper view.means it couldn't render proper css. What could be the possible Error.if anybody help please! Here is my HTML Page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" media="all" href="" />
<style>
</style>
</head>
<body>
<div class="main">
<h3 style="text-align:center"><u>X-Ray Invoice</u></h3>
<p><strong>Box Number:</strong> </p><br>
<p style="float:right; margin-top: -38px;margin-right: 230px;"><strong>Custromer ID:</strong> </p><br>
<h4><u>Custromer Profile:</u></h4>
<div class="main-sub">
<div class="sub-1">
<p><strong>Name:</strong> </p><br>
<p><strong>Mobile:</strong> </p><br>
</div>
<div class="sub-2">
<p><strong>Voucher Number:</strong> X-</p><br>
<p><strong>Receive Date:</strong> </p><br>
</div>
</div>
<div class="table-main">
<table style="width:100%">
<tr>
<td><strong>SL.</strong></td>
<td><strong>Item Name</strong></td>
<td><strong>Amount</strong></td>
</tr>
<?php $i=1; ?>
@foreach($carts as $row)
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<?php $i++; ?>
@endforeach
@if($transaction->vat>0)
<tr>
<td colspan="5"><strong>Net Amount</strong> </td>
<td></td>
</tr>
<tr>
<td colspan="5"><strong>Vat (15%)</strong> </td>
<td></td>
</tr>
@endif
<tr>
<td colspan="5"><strong>Total Bill Amount</strong> </td>
<td></td>
</tr>
</table><br>
</div>
<div class="ammount">
<p><b>Amount in Words: </b></p><br>
</div>
<div class="two-table">
<div class="one">
<table style="width: 90%; text-align:center;">
<tr>
<td><strong>Bill Amount :</strong></td>
<td></td>
</tr>
<tr>
<td><strong>Discount :</strong></td>
<td></td>
</tr>
<tr>
<td><strong>Due :</strong></td>
<td></td>
</tr>
</table><br>
<p style="margin-top: 5px;"><strong>Delivery Date :</strong> </p>
</div>
<div class="two">
<table style="width: 90%; text-align:center;">
<tr>
<td><strong>Checked By :</strong></td>
<td style="min-width: 100px"></td>
</tr>
<tr>
<td><strong>X-Ray By :</strong></td>
<td></td>
</tr>
<tr>
<td><strong>Marked By :</strong></td>
<td></td>
</tr>
</table><br>
<p style="margin-top: 5px;"><strong>Delivery Time :</strong> </p>
</div>
</div><br><br>
<div class="footer">
<p class="foot-p"><strong>Authorized Signature</strong></p>
<p class="foot-p-2"><strong>Customer Signature</strong></p>
</div>
</div>
</body>
</html>
And here is the style_x.css
* {
margin: 0px;
padding: 0px;
}
/* Base CSS */
.alignleft {
float: left;
margin-right: 15px;
}
.alignright {
float: right;
margin-left: 15px;
}
.aligncenter {
display: block;
margin: 0 auto 15px;
}
a:focus {
outline: 0 solid
}
img {
max-width: 100%;
height: auto;
}
h1, h2, h3, h4, h5, h6 {
margin: 0 0 15px;
font-weight: 700;
padding-left: 20px;
}
p {
padding-left: 20px;
}
body {
font-family: sans-serif;
}
a:hover {
text-decoration: none
}
.main {
width: 8.27in;
height: 11.69in;
margin: 0 auto;
}
.blank_height {
width: 100%;
height: 100px;
}
.main-sub {
width: 100%;
}
.sub-1 {
width: 49%;
float: left;
}
.sub-2 {
width: 49%;
float: right;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
.table-main {
width: 93%;
margin: 0 auto;
text-align: center;
}
.ammount {
padding-left: 30px;
}
.one-tab {
width: 95%;
height: 100px;
padding: 20px;
}
.two-tab {
width: 50%;
height: 100px;
padding: 20px;
}
.one-tab table {
float: right;
}
.del {
width: 40%;
float: right;
margin-top: -100px;
}
.foot-p {
width: 21%;
padding: 20px;
margin-left: 20px;
border-top: 1px solid #000;
}
.foot-p-2 {
width: 21%;
padding: 20px;
float: right;
margin-right: 20px;
margin-top: -55px;
border-top: 1px solid #000;
}
.note {
padding: 40px;
}
.note ul {
margin-left: 50px;
font-size: 12px;
}
.two-table {
width: 100%;
height: 150px;
}
.one {
width: 44%;
height: 150px;
float: left;
padding-left: 25px;
}
.two {
width: 44%;
height: 150px;
margin-left: 51%;
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2u7aoxB
via IFTTT
Aucun commentaire:
Enregistrer un commentaire