0

Currently using bootstrap for the css framework and have successfully placed the video on the DOM. My only issue is the video is pushing my container down when I want it placed over the video. I Noticed in the HTML that #big-video-vid contains inline styles, and one of them being height

<div id="big-video-vid" class="video-js vjs-default-skin vjs-controls-disabled vjs-has-started vjs-user-inactive vjs-playing" style="width: 1496.1246105919004px; height: 938px; display: block; top: 0px; left: -237.06230529595018px;">

When I remove the height from the inline, everything works like how I want it. I tried using jquery to remove the inline style eg.: $('#big-video-vid').css('height', ''); but no avail. Any tips?

Here is the library i'm using https://github.com/dfcb/BigVideo.js

8
  • 3
    Try $("#big-video-vid").css("height", "auto"); Commented Nov 12, 2013 at 17:40
  • Are you running $('#big-video-vid').css('height', ''); after #big-video-vid and its styles are added to the dom? The snippet you wrote will definitely remove the height attribute completely. Commented Nov 12, 2013 at 17:41
  • 2
    Duplicate the error in a jsFiddle please. Commented Nov 12, 2013 at 17:42
  • 1
    Worth a try. When trying to remove an inline style value, it's best to go to the default value, rather than set it to nothing. At least it's ruled out. Commented Nov 12, 2013 at 17:49
  • 1
    Provide a demo of your problem. Upload your test page somewhere, or make a jsfiddle.net / jsbin.com demo. The author of BigVideo.js probably didn't add the height attribute for fun, there's some reason it's there. Commented Nov 12, 2013 at 17:51

2 Answers 2

2

In your CSS:

#big-video-vid {
    height: auto !important;
}
Sign up to request clarification or add additional context in comments.

Comments

0

Try:

$("#big-video-vid").css({'height' : 'auto'});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.