* Graham
This is a elegant trick to create a responsive youtube embedded iframe video
add this css to your stylesheet
/* This element defines the size the iframe will take.
       In this example we want to have a ratio of 25:14 */
    .aspect-ratio {
      position: relative;
      width: 100%;
      height: 0;
      padding-bottom: 56%; /* The height of the item will now be 56% of the width. */
    }

    /* Adjust the iframe so it's rendered in the outer-width and outer-height of it's parent */
    .aspect-ratio iframe {
      position: absolute;
      width: 100%;
      height: 100%;
      left: 0;
      top: 0;
    }

Copy code
And then add your youtube iframe like this
<div class="aspect-ratio"><iframe src="https://www.youtube.com/embed/YOUTUBE VIDEO ID CODE GOES HERE" width="550" height="275" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>
Copy code
the iframe will resize to the limit of the container but retain the correct aspect ratio
demo http://baretest.xtgem.com/tubeframe
2017-04-17 00:19 (edited 2017-04-17 00:49 by Graham ) · (0)
* Mwebvendor Its a nice graham, bu the way... about theme selector in your blog tutorial,,, how to change it via one click... example if i choose theme2 in dropdown it automaticaly set the theme ...
2017-04-17 23:47 · (0)
* Graham * Mwebvendor try onchange="this.form.submit()" on the 'select' element
2017-04-17 23:59 · (0)

Online: Guests: 1