Grow your CSS skills. Land your dream job.

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 http://fitvidsjs.com.

    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](http://daringfireball.net/projects/markdown/syntax “More info”).

    # October 10, 2014 at 5:06 am

    Ohmy, I have the exact same problem. Please see this site: josiahcatering.com , 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.

*May or may not contain any actual "CSS" or "Tricks".