provide-free-support Ujjwal's Blog: March 2014

Monday, March 31, 2014

CSS Score

(Original Article at http://sgdev-blog.blogspot.sg/2014/01/css-score.html

We all know that when many conflict css properties can be applied for one web element, it is by specification that the more specific properties will be applied. However, specific is an abstract word. Hence, it is better that we know about css score, or how browser choose which properties to override. 

Browser categorize css to 4 categories with the specificity from high to low as: 

1/ Style Attribute:
  •  


  • 2/ ID: #some_id{ color: red;} 

    3/ Class, pseudo class, attribute: .some_class {color:green;} 

    4/ Elements: li {color:black;} 

    From W3C recommendation, the result of this calculation takes the form of four comma-separated values, a,b,c,d,1 where the values in column “a” are the most important and those in column “d” are least important. A selector’s specificity is calculated as follows: 

    To calculate a, count 1 if the declaration is from a style attribute rather than a rule with a selector (an inline style), 0 otherwise. 
    To calculate b, count the number of ID attributes in the selector. 
    To calculate c, count the number of other attributes and pseudo-classes in the selector. 
    To calculate d, count the number of element names and pseudo-elements in the selector. 
    Here is one example using this rule: 

    body#home div#warning p.message --> 0, 2, 1, 3 

    Please notice the comma ',' in the css score, it is there to remind us that the score b, c, d can be equal or bigger than 10. Still, the rule to compare is left to right.

    Checking Javascript errors remotely

    Think of a scenario where your website has gone LIVE. Now there occurs a JavaScript error and because of that the record cannot be saved in database and this happens only with internet explorer 7. The client is now complaining.  You checked this at your end to analyse but it seems to be working at your end.

    For scenarios like above, i found a great tool which can help us to monitor JavaScript errors. Yes, but for this you need to add a script in the page where you want to monitor. Check below link

    https://qbaka.com
    best-it-exam-    | for-our-work-    | hottst-on-sale-    | it-sale-    | tast-dumps-us-    | test-king-number-    | pass-do-it-    | just-do-it-    | pass-with-us-    | passresults-everything-    | passtutor-our-dumps-    | realtests-us-exam-    | latest-update-source-for-    | cbtnuggets-sale-exam    | experts-revised-exam    | certguide-sale-exam    | test4-sale-exam    | get-well-prepared-    | certkiller-sale-exam    | buy-discount-dumps    | how-to-get-prepared-for-the    | in-an-easy-way    | brain-dumps-sale    | with-pass-exam-guarantee    | accurate-study-material    | at-first-try    | 100%-successful-rate    | get-certification-easily    | material-provider-exam    | real-exam-practice    | with-pass-score-guarantee    | certification-material-provider    | for-certification-professionals    | get-your-certification-successfully    | 100%-Pass-Rate    | in-pdf-file    | practice-exam-for    | it-study-guides    | study-material-sku    | study-guide-pdf    | prep-guide-demo    | certification-material-id    | actual-tests-demo    | brain-demos-test    | best-pdf-download    | our-certification-material    | best-practice-test    | leading-provider-on    | this-course-is-about    | the-most-reliable    | high-pass-rate-of    | high-pass-rate-demo    | recenty-updated-key    | only-for-students-free-download    | courseware-plus-kit-for    | accurate-answers-of    | the-most-reliable-id    | provide-training-for    | welcome-to-buy    | material-for-success-pass    | provide-free-support    | best-book-for-pass    | accuracy-of-the-answers    | pass-guarantee-id    | pass-exam-key    | pass-sku-id    | study-for-exid    | pdf-sku-exid    | sku-pdf-id    | pdf-demo-key    | exam-demo-ske    | pass-it-dump    |
    http://inn-on-the-hill.com/    | http://inn-on-the-hill.com/    |