+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / IE6 issue displaying both conditional css and main css at the same time

IE6 issue displaying both conditional css and main css at the same time

2 posts, 0 answered
  1. Mark
    Mark avatar
    3 posts
    Registered:
    24 Apr 2009
    30 Sep 2009
    Link to this post
    I'm having some problems getting my conditional IE6 style sheet to work in Site Finity. I have the following code in my code behind for my master page:

    -----------------------------------------------

    private void Page_Load(object sender, System.EventArgs e)
            {

                //Check to see what kind of browser is requesting the page  
                HttpBrowserCapabilities Browser = Request.Browser;
                //Attach a CSS style sheet accordingly  
                if ((Browser.Type == "InternetExplorer6") || (Browser.Type == "IE6"))
                {
                    this.Page.RegisterClientScriptBlock("CSSLink", "<LINK href='App_Themes/ContinuumHome/ie6.css' type='text/css' rel='STYLESHEET' />");
                }
                else
                {
                    this.Page.RegisterClientScriptBlock("CSSLink", "<LINK href='App_Themes/ContinuumHome/continuumHome.css' type='text/css' rel='STYLESHEET' />");
                }
            }

    -----------------------------------------------

    This code actually works in loading the ie6.css into IE6 browsers, but my problem is that it doesn't override the main css that all the other browsers use. For example, I'm using a gif image in my ie6.css and a png image in my ContinuumHome.css. Both images are showing up in my Internet Explorer 6 browser.

    Is there anything I can switch up or change in the code that will solve this problem quickly?

    Thanks!

  2. Mr. Plinko
    Mr. Plinko avatar
    13 posts
    Registered:
    16 Jul 2009
    01 Oct 2009
    Link to this post
    I use dd png fix javascript for my sites.

    http://www.dillerdesign.com/experiment/DD_belatedPNG/
    (with video demo!?)

    Maybe this could work for you too?
2 posts, 0 answered