Giacomo Lawrance Giacomo Lawrance - 2 months ago 6
HTML Question

Adding multiple PDFs into HTML

<section class="features section-padding" id="features">
<div class="container">
<div class="row">
<div class="feature-list">
<h3>San Diego</h3>
<p>Departure</p>
<body>
<iframe src="http://flightaware.com/resources/airport/SAN/APD/AIRPORT+DIAGRAM/pdf" width="600" height="700">
<iframe src="https://flightaware.com/resources/airport/KSAN/DP/all/pdf" width="600" height="700">
</body>
<p>Approach</p>
<body>
<iframe src="https://flightaware.com/resources/airport/KSAN/STAR/all/pdf" width="600" height="700">
<iframe src="https://flightaware.com/resources/airport/KSAN/IAP/all/pdf" width="750" height="800">
</body>
</div>
</div>
</div>
</section>


That is what I have at the moment, but it only shows one pdf, the top one. How can I get it to show all the pdfs?

Thanks

Answer

First of all, you forgot to close your iframe tags.

The iframe tag is not self closing and should be explicitly closed like the following:

<iframe src="https://www.weather.com" width="600" height="700"></iframe>

(Notice the </iframe> closing tag)

This one worked for me (your original HTML re-worked):

<section class="features section-padding" id="features">
    <div class="container">
        <div class="row">
            <div class="feature-list">
                <h3>San Diego</h3>
                <p>Departure</p>
                  <div>
                  <iframe src="https://www.weather.com" width="600" height="700"></iframe>
                    <iframe src="https://www.weather.com" width="600" height="700"></iframe>
                  </div>
                <p>Approach</p>
                  <div>
                    <iframe src="https://www.weather.com" width="600" height="700"></iframe>
                    <iframe src="https://www.weather.com" width="750" height="800"></iframe>
                  </div>
              </div>
           </div>
      </div>
   </section>

See it here: https://jsfiddle.net/c55zztbn

If you are still not getting your iframe's src URL's shown, the url you are using might be using a "X-Frame-Options" response header which will prevent the iframe from loading it.

Hope that it helps a bit!