How do you avoid caching during development?

Add the filemtime() of your stylesheet as version parameter. Lets say, your default stylesheet is in css/default.css and css/default.min.css (not style.css). When we register a stylesheet on wp_loaded (not init), we can pass a version as fourth parameter. That will be the last modified time and therefore change every time we change the file. $min … Read more

How can I center

Since ul and li elements are display: block by default — give them auto margins and a width that is smaller than their container. If you’ve changed their display property, or done something that overrides normal alignment rules (such as floating them) then this won’t work.

How to make canvas responsive

To change width is not that hard. Just remove the width attribute from the tag and add width: 100%; in the css for #canvas Changing height is a bit harder: you need javascript. I have used jQuery because i’m more comfortable with. you need to remove the height attribute from the canvas tag and add this script: You can see this fiddle: https://jsfiddle.net/1a11p3ng/3/ … Read more

CSS Color Filter Overlay

A combination of CSS filters would be one method but without seeing the actual source page it’s hard to be certain. Expand snippet Alternatively, a simple greyscale filter with a transparent green overlay. Expand snippet

CSS rotation cross browser with jquery.animate()

CSS-Transforms are not possible to animate with jQuery, yet. You can do something like this: You can read more about the step-callback here: http://api.jquery.com/animate/#step http://jsfiddle.net/UB2XR/23/ And, btw: you don’t need to prefix css3 transforms with jQuery 1.7+ Update You can wrap this in a jQuery-plugin to make your life a bit easier: http://jsbin.com/ofagog/2/edit Update2 I … Read more

How to select label for=”XYZ” in CSS?

The selector would be label[for=email], so in CSS: …or in JavaScript using the DOM: …or in JavaScript using jQuery: It’s an attribute selector. Note that some browsers (versions of IE < 8, for instance) may not support attribute selectors, but more recent ones do. To support older browsers like IE6 and IE7, you’d have to use a … Read more

CSS selector for first element with class

This is one of the most well-known examples of authors misunderstanding how :first-child works. Introduced in CSS2, the :first-child pseudo-class represents the very first child of its parent. That’s it. There’s a very common misconception that it picks up whichever child element is the first to match the conditions specified by the rest of the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)