Thursday, March 19, 2009

Internet Explorer 8 Back Ground color issue

Today I saw a really interesting issue. The issue come up with Internet Explorer 8. However my site is running with out any issues since lot of days. In my page, I has a some shifts to be selected to do some task. Each shift may have some color. I need to display all the shifts in their own colors. To do this I have a RadioButtonList in my asp.net page. I am adding the style attribute to the page from the code behind as follows,

radioButtonListItem.Attributes.Add("style", "color:white;background-color:" + alteredColor);

This will display the my radio button list similar to this,



However, this looked very ugly when viewed in Internet Explorer 8,



After doing a small research, I understood that the background color is missing. Unfortunately, I was unable to browse the google in a effective way, since the problem is some what new. However with some observation Microsoft provided a good alternative for this issue. There is a button named "Compatibility View" which is placed just beside address bar of IE 8,



In the above image, you can see that there is a button just beside the Address bar. While clicking this button the page will reload. This has fixed the problem in my case.

2 comments:

  1. so every time user need to reload the page?

    ReplyDelete
  2. There is no need to make any reload the page. Once, the compatibility mode button is clicked on any site, then the entire site will be run under the compatibility mode. The page will reload only when the compatibility mode button is clicked.

    ReplyDelete