background preloader

Responsive

Facebook Twitter

Responsive Embeds. When we look at responsive embedding we have to deal with how an element appears on a number of devices and multiple sizes.

Responsive Embeds

Luckily for us, most embeds take care of this for us, we just need to display them correctly and allow them to resize with our content. For example, this is a responsive embed: You can prove it to yourself by resizing the window, but it looks like any other embed. We can accomplish this with just a bit of css and some javascript. The implementation below has both the code and the css. We have have built a small demo that will resize an embed for you. Responsive iFrames. This page demonstrates code to add responsiveness to content streamed into your website form other sources such as YouTube or Google Calendar.

Responsive iFrames

These external sources embed their content in an iframe in your page, which has a fixed width and height. This can break a responsive layout if you don’t add some extra CSS to fix things. Responsive Video I’m using a Lego video as that’s what gets viewed on YouTube the most in my house – I have two small boys! If you resize the browser window, the video will resize with you. Responsive Calendars Making a calendar responsive isn’t ideal as it does make it very small, but it’s certainly better than having the large calendar break your responsive layout. Making Embedded Content Work In Responsive Design. Quick summary ↬ A few HTML elements don’t play nice with responsive layouts. One of these is the good ol’ iframe, which you may need to use when embedding content from external sources such as YouTube. In this article, we’ll show you how to make embedded content responsive using CSS.

A few HTML elements don’t play nice with responsive layouts. One of these is the good ol’ iframe, which you may need to use when embedding content from external sources such as YouTube. In this article, we’ll show you how to make embedded content responsive using CSS, so that content such as video and calendars resize with the browser’s viewport. Further Reading on SmashingMag: Note: This technique was originally detailed in Thierry Koblenz’s excellent tutorial ‘Creating Intrinsic Ratios for Video’. More after jump! The Markup For Embedded Content Services such as YouTube provide code that you can copy and paste into your own website to embed content. Fortunately, there is a way around this using CSS. Como hacer responsive web los vídeos de Youtube o Vimeo - Manolo Aguado - Diseño web - Social Media. Este año será el de la creación de sitios web con Responsive Web Design, una técnica que adapta el diseño web a cualquier dispositivo y/o resolución.

Como hacer responsive web los vídeos de Youtube o Vimeo - Manolo Aguado - Diseño web - Social Media

Es por tanto indispensable que todo el contenido del sitio web sea Responsive para que no rompa el diseño, esto lo controlamos con el css y mediaquerys de nuestro servidor ¿Pero que pasa con el contenido externo? Pongamos por ejemplo que queremos embeber un vídeo de Youtube, para esta tarea nos ofrecen un iframe. Para que el iframe se adapte vamos crear algunos divs y css. Responsive Design: Create Fluid YouTube and Vimeo Content. The approach most web developers take to make images responsive cannot be employed for videos from YouTube or Vimeo, as they deliver their content using embedded iframe elements.

Responsive Design: Create Fluid YouTube and Vimeo Content

The generic code suggested to embed a YouTube video is as follows: There are two primary ways to make embedded videos responsive. Before introducing the methods, we’ll strip off the redundant attributes: The first technique to make embedded video fluid is almost pure CSS. It only requires wrapping a div with a class around the iframe element: Then applying CSS to the class and the iframe inside: The technique uses the standard approach of placing an absolutely positioned element inside a relative one, with an offset.

The second method still uses a div container but creates fluidity with JQuery, in the form of a plugin called FitVids, developed by Chris Coiyer, Dave Rupert, and others: <script>$(document).ready(function(){ $("#thing-with-videos").fitVids();