Reputation: 73
I'm using PDF.js to preview a PDF doc in my page.
I't works perfectly without doctype on top of the page. But when I add it, the PDF viewer stops working.
My doctype:
<!DOCTYPE HTML>
Where I call the viewer:
echo '<div id="pdfViewer">';
include('pdf_viewer.php');
echo '</div>';
CSS style of the pdfViewer division:
#pdfViewer {
margin: 10px;
}
How can I add the doctype declaration and still keep my viewer working?
Upvotes: 1
Views: 468
Reputation: 73
The problem was indeed that the parent didn't have a height.
see: Why can't I make my div 100% height if I use an HTML5 doctype? How do I get it 100% height
example:
#pdfViewer {height: 800px;}
Upvotes: 1