How to center a video [closed]

To center an element, you will also have to style it’s parent element too. So let’s say, you video has a structure like this: <div class=”parent-class”> <video class=”wp-video”> </video> </div> To center the video, you will have to give it’s parent a width. Using: .parent-class{ width:100%; display:block; } Now, you can use this to do … Read more

Minify HTML, CSS, JS with PHPWee?

There is little ‘bug’ in PHPWee. It should use <?php instead of <?: <? namespace PHPWee; require_once(“src/CssMin/CssMin.php”); require_once(“src/HtmlMin/HtmlMin.php”); require_once(“src/JsMin/JsMin.php”); // Open-source (BSD) PHP inline minifier functions for HTML, XHTML, HTML5, CSS 1-3 and Javascript. // BSD Licensed – https://github.com/searchturbine/phpwee-php-minifier/blob/master/LICENSE // // Usage // $output = \PHPWee\Minify::html($any_html); // $output = \PHPWee\Minify::css($any_css); // $output = \PHPWee\Minify::js($any_js);

Collapsible button inside a ul list does work in jsfiddle but not in WP

Solution provided by Steven <script type=”text/javascript”> ( function() { coll = document.getElementsByClassName(“col”); conn = document.getElementsByClassName(“con”); var i; for (i = 0; i < coll.length; i++) { coll[i].setAttribute(‘data-id’, ‘con’ + i); conn[i].setAttribute(‘id’, ‘con’ + i); coll[i].addEventListener(“click”, function() { this.classList.toggle(“active”); var content = document.getElementById(this.getAttribute(‘data-id’)); if (content.style.maxHeight) { content.style.maxHeight = null; } else { content.style.maxHeight = content.scrollHeight + … Read more