fitvids.js generates div element within – why?

  • # March 22, 2013 at 1:11 pm

    Fitvids.js works great, but I have a question about its workings. The JS generates styles that are then injected into the page markup, which is totally fair enough, but these are wrapped in a div (with the class .fit-vids-style), which is then placed within the <head> – before either the first <base> or <script> elements. As an example, view the generated source of

    Any idea why it’s wrapped in a div, rather than simply being <style> in the <head>? Is this valid? Really interested to know the thinking behind this… thanks!

    # March 22, 2013 at 5:38 pm

    Fixed up your post for you. If you want to include inline HTML, just add backticks ` around the code. If you want to add blocks of code, indent by four spaces or select your code and click the code button. [More info on Markdown]( “More info”).

    # October 10, 2014 at 5:06 am

    Ohmy, I have the exact same problem. Please see this site: , there’s a “-” on the top left corner of the page, and in the source code it says .fit-vids-style. Prob is, I dunno where to find this code (or whatever). I’m using a custom WordPress theme and I’m not sure how fitvids.js is used in this template. Please help! :-/

    # October 10, 2014 at 6:43 am

    I don’t really see what you are referring to…I’m not seeing any element with the class “fit-vids-style”…?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed