Make your YouTube embed field responsive

I use the media module on this site to embed videos from my YouTube channel but the rendered videos were not responsive. I was lazy for over a year but today I thought of fixing it. Quick search on google and I found this link.

  1. .field--name-field-media-oembed-video{
  2.   position: relative;
  3. }
  5. .field--name-field-media-oembed-video:after {
  6.   content: '';
  7.   display: block;
  8.   padding-bottom: 56.25%;
  9. }
  11. .field--name-field-media-oembed-video iframe {
  12.   position: absolute;
  13.   top: 0;
  14.   right: 0;
  15.   bottom: 0;
  16.   left: 0;
  17.   width: 100%;
  18.   height: 100%;
  19.   margin: 0;
  20. }

Ravi Sagar Newsletter

Honestly I hardly send out mails but I guess there is no harm in at least having a newsletter. I will only send newsletter when I have something important to share or an update. People are busy and no one has time to read emails these days. If you really like my content then I guess you will remember my site and come back for more.

Want to contact me?