0

I'm currently using this code to embed my PDF file on an HTML page:

<embed src="http://www.mywebsite.com/file.pdf" width="95%" type="application/pdf">

Is there a way that I can make the height be 80% of whatever the users current screen size is? That way they can always view the entire PDF within the size of their screen?

Tryin2Code
  • 121
  • 2
  • 9
  • this question will help you: http://stackoverflow.com/questions/3437786/how-to-get-web-page-size-browser-window-size-screen-size-in-a-cross-browser-wa –  Aug 03 '13 at 23:17

1 Answers1

0

Yes, it is possible. Use this css:

body, html{
    height: 100%;
}

embed{
    height: 80%;
}

fiddle: http://jsfiddle.net/ntQVw/

Ahmad
  • 5,551
  • 8
  • 41
  • 57