Why adding version number to CSS file path?

From HTML5 ★ Boilerplate Docs: What is ?v=1″ ‘?v=1’ is the JavaScript/CSS Version Control with Cachebusting Why do you need to cache JavaScript CSS? Web page designs are getting richer and richer, which means more scripts and stylesheets in the page. A first-time visitor to your page may have to make several HTTP requests, but by … Read more

Change CSS of class in Javascript?

You can do that — actually change style rules related to a class — using the styleSheets array (MDN link), but frankly you’re probably better off (as changelog said) having a separate style that defines the display: none and then removing that style from elements when you want them no longer hidden.

Vertically centering a div inside another div

tl;dr Vertical align middle works, but you will have to use table-cell on your parent element and inline-block on the child. This solution is not going to work in IE6 & 7.Yours is the safer way to go for those.But since you tagged your question with CSS3 and HTML5 I was thinking that you don’t mind using a modern … Read more

How to override !important?

Overriding the !important modifier Simply add another CSS rule with !important, and give the selector a higher specificity (adding an additional tag, id or class to the selector) add a CSS rule with the same selector at a later point than the existing one (in a tie, the last one defined wins). Some examples with a … Read more

a href link for entire div in HTML/CSS

UPDATE 06/10/2014: using div’s inside a’s is semantically correct in HTML5. You’ll need to choose between the following scenarios: which is semantically incorrect, but it will work. which is semantically correct but it involves using JS. which is semantically correct and works as expected but is not a div any more.