• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 53
  • Last Modified:

Error embedding video in my php pahe

I embed a video inmy php page

I have this code

<div class="videoWrapper">
    <!-- Copy & Pasted from YouTube -->
    <iframe width="560" height="349" src="http://www.youtube.com/embed/n_dZNLr2cME?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>

.videoWrapper {
      position: relative;
      padding-bottom: 56.25%; /* 16:9 */
      padding-top: 25px;
      height: 0;
.videoWrapper iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-106993862-1"></script>

The video is embedded like this:

      <div class="videoWrapper">
    <!-- Copy & Pasted from YouTube -->
    <iframe width="560" height="349" src="http://www.youtube.com/embed/DScD4c2WH9E?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>

When load the page it looks ok


But inspecting the page I get this console error

unreachable code after return statement


Anf google adwords disapprives ny ad becaus the pgp pag has ann error

Any ideas?
1 Solution
Dave BaldwinFixer of ProblemsCommented:
If you look at the source in the Firefox 'View Source' you will see that you have some formatting errors.  The 'meta' should go after the <head> tag and the comments at the bottom are both formatted wrong and should go before the </body> tag.
robrodpAuthor Commented:
Anf firefox handles some stuff differently. But yes I had a coding issue
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now