https://animista.net/
CSS Resources
Displaying a YouTube video with iframe full width of page
HTML
<div class="videoWrapper">
<iframe src="http://www.youtube.com/embed/mC-zw0zCCtg" width="560" height="349">
</iframe>
</div>
CSS
.videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0; } .videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
CSS Unit: REM
Relative length units specify a length relative to another length property. Relative length units scale better between different rendering mediums.
Source: W3School
rem is a CSS unit that is relative to the font-size of the root element.
0.25rem is 4px
0.50rem is 8px
0.75rem is 12px
1rem is 16px
Here’s a helpful chrome extension to help you convert px to rem called PxtoRem: https://chrome.google.com/webstore/detail/pxtorem/ldbemkmafmibhpncgagpegmhbhpolnlp?hl=en
Bootstrap PopOver Hacks
Here’s how you can add an HTML code on a data-content of a Bootstrap popover. On the example below, we’re going to add a link on our popover.
Below is a typical Bootstrap popover code.
HTML
<a href="#" role="button" class="popover" data-toggle="popover" title="" data-content="Sample Content <a href='http://winnieverzosa.com' title='sample link'>LINK</a>" data-original-title="Sample Title">Click me</a>
All you need to do is to pass an object to the popover function with a property HTML and set it to true.
JavaScript
<script> $("[data-toggle=popover]").popover({html:true}) </script>
And that is it! You should be able to add any HTML code on your data-content.
Here’s you can manipulate the size of your popover.
You can just simply pass an object to the popover function with a property container and assign ‘body’ to it.
JavaScript
<script> $("[data-toggle=popover]").popover({container: 'body'}) </script>
CSS
.popover{ max-width: 100%; /* Max Width of the popover (depending on the container!) */ }
Let’s put these together and here’s how you can use it.
HTML
<a href="#" role="button" class="popover" data-toggle="popover" title="" data-content="Sample Content <a href='http://winnieverzosa.com' title='sample link'>LINK</a>" data-original-title="Sample Title">Click me</a>
JavaScript
<script> $("[data-toggle=popover]").popover({html:true, container: 'body'}) </script>
CSS
.popover{ max-width: 100%; /* Max Width of the popover (depending on the container!) */ }
Run snippet here -> https://www.bootply.com/winnieverzosa/7OYbHIuCUw
Buttons Inline
Here’s a snippet of the code where you can have your buttons inline.
<div class="btn-toolbar"> <button type="button" class="btn btn-primary btn-md"> SAVE </button> <button type="button" class="btn btn-default btn-md "> CANCEL </button> </div>
Run Snippet here -> https://www.bootply.com/winnieverzosa/0ZkU3RNgdu