Friday, February 20, 2015

Calculating CSS Specificity Value

    Why is that our first attempt at changing the color and font-weight failed? As we learned, it was because simply using the class name by itself had a lower specificity value and was trumped by the other selector which targeted the unordered list with the ID value. The important words in that sentence were class and ID. CSS applies vastly different specificity weights to classes and IDs. In fact, an ID has infinitely more specificity value! That is, no amount of classes alone can outweigh an ID.
    Let's take a look at how the numbers are actually calculated:

Monday, February 3, 2014

IE9 & IE8 Intranet compatibility mode in Intranet websites


So you have written an HTML5 site on your local intranet with some lovely CSS3 and run it up in Firefox and you feel smug, all your HTML and CSS are perfectly formed, but you run it up in IE9 and all the CSS3 goodness has gone away leaving your lack luster IE7 version of your site.

Why is IE9 and IE8 running in IE7 compatibility mode? 

IE9 has a hidden setting that forces it to run in compatibility mode when it encounters any intranet websites. Microsoft have detailed this behaviour in a Blog about what they call Smart compatibility mode.
Compatibility View Settings dialog.  At the bottom is an option to automatically display intranet sites in Compatibility view.

Monday, December 2, 2013

How do you know if the SharePoint page is in Edit Mode from JavaScript?

Is there a way to find out if a SharePoint page is in Edit Mode from JavaScript?
Yes there is.

Look for the MSOLayout_InDesignMode attribute in the javascript.

Popular Posts