RSS

Easy way to figure out cross browser compatibility

29 Feb

Many of the web developers just use various css,html,javascript codes which they have learned. But wait! as we all know that significant amount of tags codes etc are not supported in some older major browser versions. Even they are older versions dont forget significant amount of visitors might be from those versions.

However consider follwing CSS,


body > p {color: red;}
 

So this tells select all paragraph tags which are DIRECT children of body tag. so it will select paragraph tags like these





some text which will get body > p {color: red;}  selector

 

but it will not select paragraphs like following. since it is in div tag and so not direct child of body tag.




<div>


this will not be red text from above body > p {color: red;} selector since its not direct child of body tag


<div>
 

So important thing is does this support in many major browsers versions actually it does but its not in IE 6 but memorizing these things can be super difficult to developers. Take a look at this http://caniuse.com/ I found its extremely easy to detect this kind of things. Site also shows many other insights regarding browsers such as browser share currently being used in the world. However still you have to test your code for various browsers for odd cases that arises due to various reasons but at least you can know in upfront (ie before you do production releases) that it will not work in specific browsers isn’t it nicer than that of being rejected from QA or wait for clients to report when yours site will have been deployed?

Advertisements
 
1 Comment

Posted by on February 29, 2012 in CSS, Javascript

 

Tags:

One response to “Easy way to figure out cross browser compatibility

  1. movies

    January 19, 2015 at 3:38 pm

    Good article. I’m facing a few of these issues as well..

    Like

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: