Thursday, August 1, 2013

One of the reason that "why I hate IE"

Recently, I got strange issue with showModalDialog and IE 7/8. Actually I want to implement some gradient background for button. For gradient, we need to define CSS property as per browser, so I have set gradient background for major browser like Chrome,Safari,FireFox,Opera and IE.
Have a look my button CSS looks like:

.myFancyButton{
	background: #2491c6; /* Older browsers */
	background: -moz-linear-gradient(top,  #7ABCDC 0%, #2491c6 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7ABCDC), color-stop(100%,#2491c6)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #7ABCDC 0%,#2491c6 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #7ABCDC 0%,#2491c6 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #7ABCDC 0%,#2491c6 100%); /* IE10+ */
	background: linear-gradient(top,  #7ABCDC 0%,#2491c6 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7ABCDC', endColorstr='#2491c6',GradientType=0 ); /* IE6-9 */
}

All things working fine, but after implementing this CSS to my project I found the strange issue from client that button didn't work with model window. For pop-up window display, I'm using showModalDialog and I identify that button is working only when I click on buttion text value. It's not work if I click inside the button but not on buttion text value. At this time I check same in FireFox and it's working well but in IE7/IE8 I don't know why it's not working. And that is the reason I hate IE.

After some workaround on this and I found that if I'm removing all browser specific CSS property for Chrome,Safari,Opera, it's works well in IE. So, now my buttons CSS looks like:

.myFancyButton{
	background: #2491c6; /* Older browsers */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7ABCDC', endColorstr='#2491c6',GradientType=0 ); /* IE6-9 */
}


There are many reasons to hate IE but here I have just mention one. If you have any reason to hate IE, please do comment below......

5 comments:

  1. I hate people who still using IE lol

    ReplyDelete
    Replies
    1. I am also agree with u priteshbhai. But after all customer is boss.....

      Delete
  2. Hello, how’s it going? Just shared this post with a colleague, we had a good laugh.

    ReplyDelete
  3. Thanks so much for sharing all of the awesome info! I am looking forward to checking out more posts! There is no doubt in it that Chrome and Firefox are the best internet browsers in the world.

    Funeral homes website design and marketing services in very economical price.

    ReplyDelete

  4. Thanks for sharing this.I agree with all of the points keep up the good work.

    JSON connector

    ReplyDelete