diff --git a/js/reveal.js b/js/reveal.js
index 6d98679d162dfda462fec64287389d48b5fa3f77..0cb82cf26f9f112e2e415bced96334bbf6398e73 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -508,7 +508,7 @@
 		injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' );
 
 		// Limit the size of certain elements to the dimensions of the slide
-		injectStyleSheet( '.reveal img, .reveal video, .reveal iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );
+		injectStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );
 
 		document.body.classList.add( 'print-pdf' );
 		document.body.style.width = pageWidth + 'px';