WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a way to force all video content on my site to scale to 100% width and I'm hoping to avoid using any additional javascript.

Is there a filter or function that I can use to accomplish this? If so how is it used? And I do not want a plugin!

share|improve this question
up vote 0 down vote accepted

Without knowing more information - you can use CSS to set a max width to any element.

iframe, object, embed {

Rachel Baker mentioned Fitvids.JS in her WordCamp Chicago presentation last weekend. It is a Javascript plugin that writes specific code for the various video providers online.

Try the CSS solution and fall back to JS if you can't figure it out.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.